now False is also affected (along with None and "")

This commit is contained in:
Miroslav Stampar 2011-01-15 23:43:26 +00:00
parent 6e4b65a822
commit 29ea0950b6

View File

@ -1945,7 +1945,7 @@ def initTechnique(technique=None):
# Restoring stored conf options
for key, value in kb.injection.conf.items():
if value and (not hasattr(conf, key) or (hasattr(conf, key) and getattr(conf, key) in ("", None))):
if value and (not hasattr(conf, key) or (hasattr(conf, key) and not getattr(conf, key))):
setattr(conf, key, value)
debugMsg = "resuming configuration option '%s' (%s)" % (key, value)
logger.debug(debugMsg)