Minor improvement

This commit is contained in:
Bernardo Damele 2011-01-15 23:20:52 +00:00
parent d3a28124b1
commit 558f3894f4

View File

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