Make sure config has name and value when masking passwords

This commit is contained in:
JonnyWong16 2019-07-10 21:37:32 -07:00
parent 91476a420a
commit f439bd639c

View file

@ -1182,7 +1182,7 @@ def split_args(args=None):
def mask_config_passwords(config):
if isinstance(config, list):
for cfg in config:
if 'password' in cfg['name'] and cfg['value'] != '':
if 'password' in cfg.get('name', '') and cfg.get('value', '') != '':
cfg['value'] = ' '
elif isinstance(config, dict):