diff options
author | Kali Kaneko <kali@leap.se> | 2015-08-04 12:18:50 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-08-04 12:18:50 -0400 |
commit | 5a97000032cf9cdb8dee5310126f6de11b09d942 (patch) | |
tree | ad4b6f576bcf488188cab873a9bc316c903daeba | |
parent | 570bf35249b1271a9453d5970059e080f2947d17 (diff) |
[style] pep8 fixes + pep8 script
-rwxr-xr-x | pep8 | 2 | ||||
-rw-r--r-- | src/leap/mail/imap/server.py | 9 | ||||
-rw-r--r-- | src/leap/mail/imap/tests/utils.py | 3 | ||||
-rw-r--r-- | src/leap/mail/tests/__init__.py | 3 |
4 files changed, 12 insertions, 5 deletions
@@ -0,0 +1,2 @@ +#!/bin/sh +pep8 src/leap/mail diff --git a/src/leap/mail/imap/server.py b/src/leap/mail/imap/server.py index 050521a..39f483f 100644 --- a/src/leap/mail/imap/server.py +++ b/src/leap/mail/imap/server.py @@ -158,11 +158,14 @@ class LEAPIMAPServer(imap4.IMAP4Server): else: mf = imap4.IMessageFile(msg, None) if mf is not None: - return imap4.FileProducer(mf.open()).beginProducing(self.transport) - return imap4.MessageProducer(msg, None, self._scheduler).beginProducing(self.transport) + return imap4.FileProducer( + mf.open()).beginProducing(self.transport) + return imap4.MessageProducer( + msg, None, self._scheduler).beginProducing(self.transport) else: - _w('BODY ' + imap4.collapseNestedLists([imap4.getBodyStructure(msg)])) + _w('BODY ' + + imap4.collapseNestedLists([imap4.getBodyStructure(msg)])) ################################################################## # diff --git a/src/leap/mail/imap/tests/utils.py b/src/leap/mail/imap/tests/utils.py index 83c3f29..a34538b 100644 --- a/src/leap/mail/imap/tests/utils.py +++ b/src/leap/mail/imap/tests/utils.py @@ -99,7 +99,8 @@ class IMAP4HelperMixin(SoledadTestMixin): # Soledad sync makes trial block forever. The sync it's mocked to # fix this problem. _mock_soledad_get_from_index can be used from # the tests to provide documents. - # TODO see here, possibly related? -- http://www.pythoneye.com/83_20424875/ + # TODO see here, possibly related? + # -- http://www.pythoneye.com/83_20424875/ self._soledad.sync = Mock() d = defer.Deferred() diff --git a/src/leap/mail/tests/__init__.py b/src/leap/mail/tests/__init__.py index b35107d..de0088f 100644 --- a/src/leap/mail/tests/__init__.py +++ b/src/leap/mail/tests/__init__.py @@ -34,7 +34,8 @@ from leap.common.testing.basetest import BaseLeapTest def _find_gpg(): gpg_path = distutils.spawn.find_executable('gpg') - return os.path.realpath(gpg_path) if gpg_path is not None else "/usr/bin/gpg" + return (os.path.realpath(gpg_path) + if gpg_path is not None else "/usr/bin/gpg") class TestCaseWithKeyManager(unittest.TestCase, BaseLeapTest): |