Merge pull request #43255 from gtmanfred/2017.7

always return a dict object
This commit is contained in:
Nicole Thomas 2017-08-30 10:47:14 -04:00 committed by GitHub
commit 1fc7307735

View File

@ -447,8 +447,8 @@ def optional_args(proxy=None):
device2:
True
'''
opt_args = _get_device_grain('optional_args', proxy=proxy)
if _FORBIDDEN_OPT_ARGS:
opt_args = _get_device_grain('optional_args', proxy=proxy) or {}
if opt_args and _FORBIDDEN_OPT_ARGS:
for arg in _FORBIDDEN_OPT_ARGS:
opt_args.pop(arg, None)
return {'optional_args': opt_args}