Handle nolog list containing None values

Fixes: https://fedorahosted.org/freeipa/ticket/856
This commit is contained in:
Simo Sorce 2011-01-26 17:37:46 -05:00
parent 0eda5918f0
commit 740b689696

View File

@ -136,6 +136,8 @@ def run(args, stdin=None, raiseonerr=True,
# to log. Run through the nolog items.
args = ' '.join(args)
for value in nolog:
if not isinstance(value, basestring):
continue
args = args.replace(value, 'XXXXXXXX')
stdout = stdout.replace(value, 'XXXXXXXX')
stderr = stderr.replace(value, 'XXXXXXXX')