IMAP class: don't suggest multithreading in single-threaded mode
Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
parent
f4140cbbed
commit
611f6e89c0
@ -23,6 +23,7 @@ import time
|
||||
from sys import exc_info
|
||||
from .Base import BaseFolder
|
||||
from offlineimap import imaputil, imaplibutil, OfflineImapError
|
||||
from offlineimap import globals
|
||||
from offlineimap.imaplib2 import MonthNames
|
||||
|
||||
|
||||
@ -53,7 +54,7 @@ class IMAPFolder(BaseFolder):
|
||||
imapobj.select(self.getfullname(), readonly = True, force = force)
|
||||
|
||||
def suggeststhreads(self):
|
||||
return 1
|
||||
return not globals.options.singlethreading
|
||||
|
||||
def waitforthread(self):
|
||||
self.imapserver.connectionwait()
|
||||
|
Loading…
Reference in New Issue
Block a user