Backwards compatibility for python 2.4
Python 2.4 doesn't allow try...except...finally clauses, see PEP 341. Also, yield statements inside try...finally is not allowed. The commit changes the logic to no longer use those syntactical features. Signed-off-by: Nicolas Sebrecht <ni.s@laposte.net>
This commit is contained in:
parent
1deb8442a5
commit
d687999a66
@ -84,7 +84,9 @@ class SigListener(Queue):
|
|||||||
self.folderlock.release()
|
self.folderlock.release()
|
||||||
yield (folder, quick)
|
yield (folder, quick)
|
||||||
self.folderlock.acquire()
|
self.folderlock.acquire()
|
||||||
finally:
|
except:
|
||||||
|
self.folderlock.release()
|
||||||
|
raise
|
||||||
self.folderlock.release()
|
self.folderlock.release()
|
||||||
|
|
||||||
def getaccountlist(customconfig):
|
def getaccountlist(customconfig):
|
||||||
@ -182,6 +184,7 @@ class AccountSynchronizationMixin:
|
|||||||
|
|
||||||
#might need changes here to ensure that one account sync does not crash others...
|
#might need changes here to ensure that one account sync does not crash others...
|
||||||
if not self.refreshperiod:
|
if not self.refreshperiod:
|
||||||
|
try:
|
||||||
try:
|
try:
|
||||||
self.sync(siglistener)
|
self.sync(siglistener)
|
||||||
except:
|
except:
|
||||||
@ -195,6 +198,7 @@ class AccountSynchronizationMixin:
|
|||||||
|
|
||||||
looping = 1
|
looping = 1
|
||||||
while looping:
|
while looping:
|
||||||
|
try:
|
||||||
try:
|
try:
|
||||||
self.sync(siglistener)
|
self.sync(siglistener)
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user