From 0f94955913c23e983a3ecc7097cbbaab0b0391a4 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Fri, 13 Jul 2012 16:40:10 +0200 Subject: [PATCH] No need for reverse sort of folder list --- src/mail_iterator.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mail_iterator.py b/src/mail_iterator.py index 9ae25b1..0b67bdd 100644 --- a/src/mail_iterator.py +++ b/src/mail_iterator.py @@ -64,12 +64,12 @@ class MailIterator: try: _result, mailboxes = self.mail_con.list() except self.mail_con.error as ex: - logging.warning("Could not retrieve mailboxes for user %s: %s", username, ex) + logging.error("Could not retrieve mailboxes for user %s: %s", username, ex) self.mailboxes = [] for mailbox in mailboxes: mailbox = MAILBOX_RESP.match(mailbox.decode('iso-8859-1')).groups() self.mailboxes.append(mailbox) - self.mailboxes = sorted(self.mailboxes, key=lambda box: box[2], reverse=True) + self.mailboxes = sorted(self.mailboxes, key=lambda box: box[2], reverse=False) return -- 1.7.1