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.

One example is Gmail's "Chats" folder that is read-only,
but contains logs of the quick chats.

Minor Changelog improvements.

Tested-by: Abdó Roig-Maranges <abdo.roig@gmail.com>
Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Eygene Ryabinkin
2012-08-05 22:40:52 +04:00
committed by Nicolas Sebrecht
parent 799905325c
commit 131ac5c827
2 changed files with 10 additions and 7 deletions

View File

@ -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"\