Minor bug fix to properly merge options from .conf file (-c) with command line switches

This commit is contained in:
Bernardo Damele 2010-12-13 21:36:23 +00:00
parent db844c1785
commit 4b79227b5a

View File

@ -1298,7 +1298,8 @@ def __mergeOptions(inputOptions):
inputOptionsItems = inputOptions.__dict__.items() inputOptionsItems = inputOptions.__dict__.items()
for key, value in inputOptionsItems: for key, value in inputOptionsItems:
if not conf.has_key(key) or conf[key] is None or value is not None: if key not in conf or (conf[key] is False and value is True) or \
value not in (None, False):
conf[key] = value conf[key] = value
def __setTrafficOutputFP(): def __setTrafficOutputFP():