From c708e36ff7900e93b46af8f25541c6c349c02b97 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Tue, 3 Apr 2012 01:13:27 +0200 Subject: [PATCH] Don't fail if no dry-run setting has been specified Somehow we failed if no dry-run setting had been specified in the config file. This got caught thanks to extending the test suite with a stock configuration. Signed-off-by: Sebastian Spaeth --- Changelog.rst | 3 +++ offlineimap/ui/UIBase.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changelog.rst b/Changelog.rst index f8bdfaa..53a9797 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -17,6 +17,9 @@ Changes Bug Fixes --------- +* Don't fail if no dry-run setting exists in offlineimap.conf + (introduced in 6.5.3) + OfflineIMAP v6.5.3 (2012-04-02) =============================== diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py index 4bf4423..eea929d 100644 --- a/offlineimap/ui/UIBase.py +++ b/offlineimap/ui/UIBase.py @@ -49,7 +49,7 @@ class UIBase(object): def __init__(self, config, loglevel = logging.INFO): self.config = config # Is this a 'dryrun'? - self.dryrun = config.getboolean('general', 'dry-run') + self.dryrun = config.getdefaultboolean('general', 'dry-run', False) self.debuglist = [] """list of debugtypes we are supposed to log""" self.debugmessages = {}