mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
don't iterate over var that is NoneType
This commit is contained in:
parent
556d7d583e
commit
4852c03d08
1 changed files with 5 additions and 4 deletions
|
@ -187,10 +187,11 @@ def query(url,
|
|||
# Make sure no secret fields show up in logs
|
||||
if isinstance(data, dict):
|
||||
log_data = data.copy()
|
||||
for item in data:
|
||||
for field in hide_fields:
|
||||
if item == field:
|
||||
log_data[item] = 'XXXXXXXXXX'
|
||||
if isinstance(hide_fields, list):
|
||||
for item in data:
|
||||
for field in hide_fields:
|
||||
if item == field:
|
||||
log_data[item] = 'XXXXXXXXXX'
|
||||
log.trace('Request POST Data: {0}'.format(pprint.pformat(log_data)))
|
||||
else:
|
||||
log.trace('Request POST Data: {0}'.format(pprint.pformat(data)))
|
||||
|
|
Loading…
Add table
Reference in a new issue