diff options
-rwxr-xr-x | mail/pep8 | 2 | ||||
-rw-r--r-- | mail/src/leap/mail/imap/server.py | 9 | ||||
-rw-r--r-- | mail/src/leap/mail/imap/tests/utils.py | 3 | ||||
-rw-r--r-- | mail/src/leap/mail/tests/__init__.py | 3 |
4 files changed, 12 insertions, 5 deletions
diff --git a/mail/pep8 b/mail/pep8 new file mode 100755 index 00000000..d0da40ec --- /dev/null +++ b/mail/pep8 @@ -0,0 +1,2 @@ +#!/bin/sh +pep8 src/leap/mail diff --git a/mail/src/leap/mail/imap/server.py b/mail/src/leap/mail/imap/server.py index 050521af..39f483f3 100644 --- a/mail/src/leap/mail/imap/server.py +++ b/mail/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/mail/src/leap/mail/imap/tests/utils.py b/mail/src/leap/mail/imap/tests/utils.py index 83c3f298..a34538bd 100644 --- a/mail/src/leap/mail/imap/tests/utils.py +++ b/mail/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/mail/src/leap/mail/tests/__init__.py b/mail/src/leap/mail/tests/__init__.py index b35107d8..de0088f4 100644 --- a/mail/src/leap/mail/tests/__init__.py +++ b/mail/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): |