From 9ad8f76a4313b83587fc44c8c864c52f02a4692c Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Sun, 5 Aug 2012 22:40:52 +0400 Subject: [PATCH] IMAPlib mixin class: pass 'readonly' exception to our callers This will allow our callers who are capable of dealing with readonly folders to properly detect this condition and act accordingly. Signed-off-by: Eygene Ryabinkin --- offlineimap/imaplibutil.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/offlineimap/imaplibutil.py b/offlineimap/imaplibutil.py index aa165f0..4290b2b 100644 --- a/offlineimap/imaplibutil.py +++ b/offlineimap/imaplibutil.py @@ -49,6 +49,9 @@ class UsefulIMAPMixIn(object): del self.untagged_responses[:] try: result = super(UsefulIMAPMixIn, self).select(mailbox, readonly) + except self.readonly as e: + # pass self.readonly to our callers + raise except self.abort as e: # self.abort is raised when we are supposed to retry errstr = "Server '%s' closed connection, error on SELECT '%s'. Ser"\ -- 1.7.11.1