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 <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-04-03 01:13:27 +02:00
parent 4b323f7532
commit c708e36ff7
2 changed files with 4 additions and 1 deletions

View File

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

View File

@ -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 = {}