Make IMAP delimiter more readable for my lazy eyes
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 13 Jul 2012 14:32:35 +0000 (16:32 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 13 Jul 2012 14:32:35 +0000 (16:32 +0200)
src/mail_iterator.py

index cd49656..7d53e91 100644 (file)
@@ -86,7 +86,8 @@ class MailIterator:
         for mailbox in self.mailboxes:
             logging.debug("Checking mailbox %s", mailbox[2])
             # detect if mailbox is shared and if skip flag is set iterate further
-            if(self.skip_shared_folders and mailbox[2].split(mailbox[1])[0] == '"user'):
+            imap_delimiter = mailbox[1]
+            if(self.skip_shared_folders and mailbox[2].split(imap_delimiter)[0] == '"user'):
                 logging.info("Mailbox %s is shared and therefore skipped.", mailbox[2])
                 continue
             # select mailbox if writable