IMAP class: don't suggest multithreading in single-threaded mode

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
Eygene Ryabinkin 2013-01-28 23:08:20 +04:00
parent f4140cbbed
commit 611f6e89c0

View File

@ -23,6 +23,7 @@ import time
from sys import exc_info from sys import exc_info
from .Base import BaseFolder from .Base import BaseFolder
from offlineimap import imaputil, imaplibutil, OfflineImapError from offlineimap import imaputil, imaplibutil, OfflineImapError
from offlineimap import globals
from offlineimap.imaplib2 import MonthNames from offlineimap.imaplib2 import MonthNames
@ -53,7 +54,7 @@ class IMAPFolder(BaseFolder):
imapobj.select(self.getfullname(), readonly = True, force = force) imapobj.select(self.getfullname(), readonly = True, force = force)
def suggeststhreads(self): def suggeststhreads(self):
return 1 return not globals.options.singlethreading
def waitforthread(self): def waitforthread(self):
self.imapserver.connectionwait() self.imapserver.connectionwait()