fix: broken retry loop would break connection management
The retry loop would release connection that would get re-released upon ``finally`` clause. In consequence, an exception would be cast. Signed-off-by: Valentin Lab <valentin.lab@kalysto.org> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:

committed by
Nicolas Sebrecht

parent
573d55827f
commit
f2ca4217c6
@@ -72,11 +72,7 @@ class GmailFolder(IMAPFolder):
|
||||
(probably severity MESSAGE) if e.g. no message with
|
||||
this UID could be found.
|
||||
"""
|
||||
imapobj = self.imapserver.acquireconnection()
|
||||
try:
|
||||
data = self._fetch_from_imap(imapobj, str(uid), 2)
|
||||
finally:
|
||||
self.imapserver.releaseconnection(imapobj)
|
||||
data = self._fetch_from_imap(str(uid), 2)
|
||||
|
||||
# data looks now e.g.
|
||||
#[('320 (X-GM-LABELS (...) UID 17061 BODY[] {2565}','msgbody....')]
|
||||
|
Reference in New Issue
Block a user