Merge branch 'ss/simplifly-account-classes' into next

Conflicts:
	offlineimap/accounts.py
This commit is contained in:
Nicolas Sebrecht 2011-02-21 13:23:47 +01:00
commit 37e5367966

View File

@ -166,7 +166,12 @@ class Account(CustomConfig.ConfigHelperMixin):
item.stopkeepalive() item.stopkeepalive()
return sleepresult return sleepresult
class AccountSynchronizationMixin:
class SyncableAccount(Account):
"""A syncable IMAP account.
Derives from class:`Account`."""
def syncrunner(self, siglistener): def syncrunner(self, siglistener):
self.ui.registerthread(self.name) self.ui.registerthread(self.name)
self.ui.acct(self.name) self.ui.acct(self.name)
@ -286,11 +291,11 @@ class AccountSynchronizationMixin:
except: except:
self.ui.warn("Exception occured while calling hook") self.ui.warn("Exception occured while calling hook")
class SyncableAccount(Account, AccountSynchronizationMixin):
pass
def syncfolder(accountname, remoterepos, remotefolder, localrepos, def syncfolder(accountname, remoterepos, remotefolder, localrepos,
statusrepos, quick): statusrepos, quick):
"""This function is called as target for the
InstanceLimitedThread invokation in SyncableAccount."""
ui = getglobalui() ui = getglobalui()
ui.registerthread(accountname) ui.registerthread(accountname)
try: try: