Skip to content

Backwards compatibility for python 2.4 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions offlineimap/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ def queuedfolders(self):
self.folderlock.release()
yield (folder, quick)
self.folderlock.acquire()
finally:
except:
self.folderlock.release()
raise
self.folderlock.release()

def getaccountlist(customconfig):
return customconfig.getsectionlist('Account')
Expand Down Expand Up @@ -183,10 +185,11 @@ def syncrunner(self, siglistener):
#might need changes here to ensure that one account sync does not crash others...
if not self.refreshperiod:
try:
self.sync(siglistener)
except:
self.ui.warn("Error occured attempting to sync account " + self.name \
+ ": " + str(sys.exc_info()[1]))
try:
self.sync(siglistener)
except:
self.ui.warn("Error occured attempting to sync account " + self.name \
+ ": " + str(sys.exc_info()[1]))
finally:
self.ui.acctdone(self.name)

Expand All @@ -196,10 +199,11 @@ def syncrunner(self, siglistener):
looping = 1
while looping:
try:
self.sync(siglistener)
except:
self.ui.warn("Error occured attempting to sync account " + self.name \
+ ": " + str(sys.exc_info()[1]))
try:
self.sync(siglistener)
except:
self.ui.warn("Error occured attempting to sync account " + self.name \
+ ": " + str(sys.exc_info()[1]))
finally:
looping = self.sleeper(siglistener) != 2
self.ui.acctdone(self.name)
Expand Down