Fix dangerous default args. (#29839)

This commit is contained in:
Matt Clay 2017-09-12 00:11:13 -07:00 committed by GitHub
parent 5caa47feb9
commit 68aeaa58a8
50 changed files with 253 additions and 87 deletions

View file

@ -58,7 +58,9 @@ def check_args(module, warnings):
warnings.append('argument %s has been deprecated and will be removed in a future version' % key)
def get_config(module, flags=[]):
def get_config(module, flags=None):
flags = [] if flags is None else flags
cmd = 'admin display-config '
cmd += ' '.join(flags)
cmd = cmd.strip()