mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
fix a KeyError if group is provided but not user
This commit is contained in:
parent
9199101ef2
commit
c738a0de76
@ -491,7 +491,7 @@ def wait(name,
|
|||||||
'Replace them with runas. '
|
'Replace them with runas. '
|
||||||
'These arguments will be removed in Salt Oxygen.'
|
'These arguments will be removed in Salt Oxygen.'
|
||||||
)
|
)
|
||||||
if kwargs['user'] is not None and runas is None:
|
if 'user' in kwargs and kwargs['user'] is not None and runas is None:
|
||||||
runas = kwargs.pop('user')
|
runas = kwargs.pop('user')
|
||||||
|
|
||||||
# Ignoring our arguments is intentional.
|
# Ignoring our arguments is intentional.
|
||||||
@ -622,7 +622,7 @@ def wait_script(name,
|
|||||||
'Replace them with runas. '
|
'Replace them with runas. '
|
||||||
'These arguments will be removed in Salt Oxygen.'
|
'These arguments will be removed in Salt Oxygen.'
|
||||||
)
|
)
|
||||||
if kwargs['user'] is not None and runas is None:
|
if 'user' in kwargs and kwargs['user'] is not None and runas is None:
|
||||||
runas = kwargs.pop('user')
|
runas = kwargs.pop('user')
|
||||||
|
|
||||||
# Ignoring our arguments is intentional.
|
# Ignoring our arguments is intentional.
|
||||||
@ -805,7 +805,7 @@ def run(name,
|
|||||||
'Replace them with runas. '
|
'Replace them with runas. '
|
||||||
'These arguments will be removed in Salt Oxygen.'
|
'These arguments will be removed in Salt Oxygen.'
|
||||||
)
|
)
|
||||||
if kwargs['user'] is not None and runas is None:
|
if 'user' in kwargs and kwargs['user'] is not None and runas is None:
|
||||||
runas = kwargs.pop('user')
|
runas = kwargs.pop('user')
|
||||||
|
|
||||||
cmd_kwargs = {'cwd': cwd,
|
cmd_kwargs = {'cwd': cwd,
|
||||||
@ -1041,7 +1041,7 @@ def script(name,
|
|||||||
'Replace them with runas. '
|
'Replace them with runas. '
|
||||||
'These arguments will be removed in Salt Oxygen.'
|
'These arguments will be removed in Salt Oxygen.'
|
||||||
)
|
)
|
||||||
if kwargs['user'] is not None and runas is None:
|
if 'user' in kwargs and kwargs['user'] is not None and runas is None:
|
||||||
runas = kwargs.pop('user')
|
runas = kwargs.pop('user')
|
||||||
|
|
||||||
cmd_kwargs = copy.deepcopy(kwargs)
|
cmd_kwargs = copy.deepcopy(kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user