From 41c21f5a9f99a916b5a5c01b964e23632676d22b Mon Sep 17 00:00:00 2001 From: Nicolas Sebrecht Date: Thu, 12 May 2011 20:59:26 +0200 Subject: [PATCH] fix: allow debugtype 'thread' from command line commit f7e9d95 [Imply single-threaded mode with -d(ebug) command line option] was broken. It pretends to imply singlethreading each time _unless_ user explicitly asks for the debug 'thread' option. Change the "force singlethreading" check from (force single threading if last column is true) +------------------------------------------+----------------+ | | | +---------------------------------+ | | |((SINGLETHREADING THREAD_MODE) | "AND") | "NOT" | +------------------+--------------+--------+----------------+ | True | True | True | False (wrong) | +------------------+--------------+--------+----------------+ | True | False | False | True | +------------------+--------------+--------+----------------+ | False | True | False | True (wrong) | +------------------+--------------+--------+----------------+ | False | False | False | True | +------------------------------------------+----------------+ To the correct one +--------------------------------------------------+-------+ | | | +-----------------------------------------+ | | |(("NOT" SINGLETHREADING THREAD_MODE) | "AND") | "NOT" | +-------------------------+---------------+--------+-------+ | False | True | False | True | +-------------------------+---------------+--------+-------+ | False | False | False | True | +-------------------------+---------------+--------+-------+ | True | True | True | False | +-------------------------+---------------+--------+-------+ | True | False | False | True | +-------------------------+---------------+----------------+ Signed-off-by: Sebastian Spaeth Signed-off-by: Nicolas Sebrecht --- offlineimap/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offlineimap/init.py b/offlineimap/init.py index 3aaa679..7258365 100644 --- a/offlineimap/init.py +++ b/offlineimap/init.py @@ -218,7 +218,7 @@ class OfflineImap: options.debugtype = 'imap,maildir,thread' #force single threading? if not ('thread' in options.debugtype.split(',') \ - and options.singlethreading): + and not options.singlethreading): ui._msg("Debug mode: Forcing to singlethreaded.") options.singlethreading = True