From 41692d03282bae408eaf1ec73c867c1086d0a678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Deparis?= Date: Fri, 4 Sep 2015 12:12:28 +0200 Subject: [PATCH] =?UTF-8?q?Try=20to=20fix=20#225=20=C2=AB=20Runonce=20(off?= =?UTF-8?q?lineimap=20-o)=20does=20not=20stop=20if=20autorefresh=20is=20de?= =?UTF-8?q?clared=20in=20DEFAULT=20section=20=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Étienne Deparis --- offlineimap/init.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/offlineimap/init.py b/offlineimap/init.py index a48c152..c6b8a64 100644 --- a/offlineimap/init.py +++ b/offlineimap/init.py @@ -217,6 +217,9 @@ class OfflineImap: imaplib.Debug = 5 if options.runonce: + # Must kill the possible default option + if config.has_option('DEFAULT', 'autorefresh'): + config.remove_option('DEFAULT', 'autorefresh') # FIXME: spaghetti code alert! for section in accounts.getaccountlist(config): config.remove_option('Account ' + section, "autorefresh")