[PATCH 10/13] Merge AccountfooMixing with SyncableAccount class

Sebastian Spaeth Sebastian at SSpaeth.de
Wed Nov 24 09:56:47 GMT 2010


It was never used on its own and we can simply use the SyncableAccount class for that purpose, so merge the methods directly in there.

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
 offlineimap/accounts.py |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/offlineimap/accounts.py b/offlineimap/accounts.py
index fe5b4dc..4d95b35 100644
--- a/offlineimap/accounts.py
+++ b/offlineimap/accounts.py
@@ -172,7 +172,12 @@ class Account(CustomConfig.ConfigHelperMixin):
             item.stopkeepalive()
         return sleepresult
             
-class AccountSynchronizationMixin:
+    
+class SyncableAccount(Account):
+    """A syncable IMAP account.
+
+    Derives from class:`Account`."""
+
     def syncrunner(self, siglistener):
         self.ui.registerthread(self.name)
         self.ui.acct(self.name)
@@ -285,12 +290,12 @@ class AccountSynchronizationMixin:
             self.ui.callhook("Hook return code: %d" % p.returncode)
         except:
             self.ui.warn("Exception occured while calling hook")
-    
-class SyncableAccount(Account, AccountSynchronizationMixin):
-    pass
+
 
 def syncfolder(accountname, remoterepos, remotefolder, localrepos,
                statusrepos, quick):
+    """This function is called as target for the
+    InstanceLimitedThread invokation in SyncableAccount."""
     global mailboxes
     ui = UIBase.getglobalui()
     ui.registerthread(accountname)
-- 
1.7.1





More information about the OfflineIMAP-project mailing list