adjust way we use dConfigParam in report

This commit is contained in:
Josh Wilson 2007-03-19 20:57:45 +00:00
parent 8a865e394b
commit dd2b5cd97c

View File

@ -2543,7 +2543,7 @@ def report(types = [], prefix = '', notifyFunc = None, dConfigParam = []):
will allow you send the report to a designated 'notify' will allow you send the report to a designated 'notify'
output. output.
dConfigParams: A list of Config.prc string variables. dConfigParam: A list of Config.prc string variables.
By default the report will always print. If you By default the report will always print. If you
specify this param, it will only print if one of the specify this param, it will only print if one of the
specified config strings resolve to True. specified config strings resolve to True.
@ -2598,14 +2598,14 @@ def report(types = [], prefix = '', notifyFunc = None, dConfigParam = []):
if not dConfigParam: if not dConfigParam:
doPrint = True doPrint = True
else: else:
if isinstance(dConfigParam,str): if not isinstance(dConfigParam, (list,tuple)):
if(config.GetBool(dConfigParam, 0)): dConfigParamList = (dConfigParam,)
else:
dConfigParamList = dConfigParam
for param in dConfigParamList:
if(config.GetBool(param, 0)):
doPrint = True doPrint = True
elif isinstance(dConfigParam, (list,tuple)): break
for param in dConfigParam:
if(config.GetBool(dConfigParam, 0)):
doPrint = True
break
if doPrint: if doPrint:
if notifyFunc: if notifyFunc: