X-Git-Url: https://code.delx.au/offlineimap/blobdiff_plain/e1fb9492f84538df698d6a2f1cfa2738929ed040..2e22b4123190c8ae434efb2bfb3d507694482644:/offlineimap/init.py diff --git a/offlineimap/init.py b/offlineimap/init.py index 447a480..8d888b4 100644 --- a/offlineimap/init.py +++ b/offlineimap/init.py @@ -16,8 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import imaplib -from offlineimap import imapserver, repository, folder, mbnames, threadutil, version, syncmaster, accounts +from offlineimap import imaplib2, imapserver, repository, folder, mbnames, threadutil, version, syncmaster, accounts from offlineimap.localeval import LocalEval from offlineimap.threadutil import InstanceLimitedThread, ExitNotifyThread from offlineimap.ui import UIBase @@ -103,7 +102,7 @@ def startup(versionno): for debugtype in options['-d'].split(','): ui.add_debug(debugtype.strip()) if debugtype == 'imap': - imaplib.Debug = 5 + imaplib2.Debug = 5 if debugtype == 'thread': threading._VERBOSE = 1 @@ -159,7 +158,7 @@ def startup(versionno): activeaccounts = activeaccounts.split(",") allaccounts = accounts.AccountHashGenerator(config) - syncaccounts = {} + syncaccounts = [] for account in activeaccounts: if account not in allaccounts: if len(allaccounts) == 0: @@ -169,7 +168,8 @@ def startup(versionno): for name in allaccounts.keys(): errormsg += '\n%s'%name ui.terminate(1, errortitle = 'Unknown Account "%s"'%account, errormsg = errormsg) - syncaccounts[account] = allaccounts[account] + if account not in syncaccounts: + syncaccounts.append(account) server = None remoterepos = None