summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/mail/imap')
-rw-r--r--src/leap/mail/imap/mailbox.py6
-rw-r--r--src/leap/mail/imap/server.py16
-rw-r--r--src/leap/mail/imap/tests/__init__.py6
-rw-r--r--src/leap/mail/imap/tests/test_imap.py2
-rw-r--r--src/leap/mail/imap/tests/test_imap_store_fetch.py12
-rw-r--r--src/leap/mail/imap/tests/walktree.py2
6 files changed, 24 insertions, 20 deletions
diff --git a/src/leap/mail/imap/mailbox.py b/src/leap/mail/imap/mailbox.py
index 4339bd2..c52a2e3 100644
--- a/src/leap/mail/imap/mailbox.py
+++ b/src/leap/mail/imap/mailbox.py
@@ -878,9 +878,9 @@ class IMAPMailbox(object):
# A better place for this would be the COPY/APPEND dispatcher
# in server.py, but qtreactor hangs when I do that, so this seems
# to work fine for now.
- #d.addCallback(lambda r: self.reactor.callLater(0, self.notify_new))
- #deferLater(self.reactor, 0, self._do_copy, message, d)
- #return d
+ # d.addCallback(lambda r: self.reactor.callLater(0, self.notify_new))
+ # deferLater(self.reactor, 0, self._do_copy, message, d)
+ # return d
d = self.collection.copy_msg(message.message,
self.collection.mbox_uuid)
diff --git a/src/leap/mail/imap/server.py b/src/leap/mail/imap/server.py
index 2b670c1..050521a 100644
--- a/src/leap/mail/imap/server.py
+++ b/src/leap/mail/imap/server.py
@@ -122,9 +122,9 @@ class LEAPIMAPServer(imap4.IMAP4Server):
elif part.text:
_w(str(part) + ' ')
_f()
- return imap4.FileProducer(msg.getBodyFile()
- ).beginProducing(self.transport
- )
+ return imap4.FileProducer(
+ msg.getBodyFile()
+ ).beginProducing(self.transport)
elif part.mime:
hdrs = imap4._formatHeaders(msg.getHeaders(True))
@@ -151,10 +151,10 @@ class LEAPIMAPServer(imap4.IMAP4Server):
_fd.seek(0)
else:
_fd = fd
- return imap4.FileProducer(_fd
- # END PATCHED #########################3
- ).beginProducing(self.transport
- )
+ return imap4.FileProducer(
+ _fd
+ # END PATCHED #########################3
+ ).beginProducing(self.transport)
else:
mf = imap4.IMessageFile(msg, None)
if mf is not None:
@@ -459,7 +459,7 @@ class LEAPIMAPServer(imap4.IMAP4Server):
mailboxes.addCallback(self._cbSubscribed)
mailboxes.addCallback(
self._cbListWork, tag, sub, cmdName,
- ).addErrback(self._ebListWork, tag)
+ ).addErrback(self._ebListWork, tag)
def _cbSubscribed(self, mailboxes):
subscribed = [
diff --git a/src/leap/mail/imap/tests/__init__.py b/src/leap/mail/imap/tests/__init__.py
index f3d5ca6..32dacee 100644
--- a/src/leap/mail/imap/tests/__init__.py
+++ b/src/leap/mail/imap/tests/__init__.py
@@ -1,4 +1,4 @@
-#-*- encoding: utf-8 -*-
+# -*- encoding: utf-8 -*-
"""
leap/email/imap/tests/__init__.py
----------------------------------
@@ -26,10 +26,10 @@ from leap.soledad.client import Soledad
from leap.soledad.common.document import SoledadDocument
-#-----------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# Some tests inherit from BaseSoledadTest in order to have a working Soledad
# instance in each test.
-#-----------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
class BaseSoledadIMAPTest(BaseLeapTest):
"""
diff --git a/src/leap/mail/imap/tests/test_imap.py b/src/leap/mail/imap/tests/test_imap.py
index af1bd69..ffe59c3 100644
--- a/src/leap/mail/imap/tests/test_imap.py
+++ b/src/leap/mail/imap/tests/test_imap.py
@@ -439,7 +439,7 @@ class LEAPIMAP4ServerTestCase(IMAP4HelperMixin):
d1 = self.connected.addCallback(strip(add_mailbox))
d1.addCallback(strip(login))
d1.addCallback(strip(select))
- #d1.addErrback(self._ebGeneral)
+ # d1.addErrback(self._ebGeneral)
d2 = self.loopback()
diff --git a/src/leap/mail/imap/tests/test_imap_store_fetch.py b/src/leap/mail/imap/tests/test_imap_store_fetch.py
index 6da8581..81f88fe 100644
--- a/src/leap/mail/imap/tests/test_imap_store_fetch.py
+++ b/src/leap/mail/imap/tests/test_imap_store_fetch.py
@@ -43,10 +43,14 @@ class StoreAndFetchTestCase(IMAP4HelperMixin):
self.connected.addCallback(
self._addSignedMessage).addCallback(
- lambda uid: self.function(
- uids, uid=uid) # do NOT use seq numbers!
- ).addCallback(result).addCallback(
- self._cbStopClient).addErrback(self._ebGeneral)
+ lambda uid: self.function(
+ uids, uid=uid
+ ) # do NOT use seq numbers!
+ ).addCallback(
+ result
+ ).addCallback(
+ self._cbStopClient
+ ).addErrback(self._ebGeneral)
d = loopback.loopbackTCP(self.server, self.client, noisy=False)
d.addCallback(lambda x: self.assertEqual(self.result, self.expected))
diff --git a/src/leap/mail/imap/tests/walktree.py b/src/leap/mail/imap/tests/walktree.py
index 695f487..4544856 100644
--- a/src/leap/mail/imap/tests/walktree.py
+++ b/src/leap/mail/imap/tests/walktree.py
@@ -1,4 +1,4 @@
-#t -*- coding: utf-8 -*-
+# -*- coding: utf-8 -*-
# walktree.py
# Copyright (C) 2013 LEAP
#