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
1 changed files with 2 additions and 1 deletions

View File

@ -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()