mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #29646 from rallytime/fix-29488
Don't stacktrace on kwargs.get if kwargs=None
This commit is contained in:
commit
52cc07cec9
@ -3157,6 +3157,9 @@ def create_snapshot(name, kwargs=None, call=None):
|
||||
'-a or --action.'
|
||||
)
|
||||
|
||||
if kwargs is None:
|
||||
kwargs = {}
|
||||
|
||||
snapshot_name = kwargs.get('snapshot_name') if kwargs and 'snapshot_name' in kwargs else None
|
||||
|
||||
if not snapshot_name:
|
||||
@ -3227,6 +3230,9 @@ def revert_to_snapshot(name, kwargs=None, call=None):
|
||||
'-a or --action.'
|
||||
)
|
||||
|
||||
if kwargs is None:
|
||||
kwargs = {}
|
||||
|
||||
suppress_power_on = _str_to_bool(kwargs.get('power_off', False))
|
||||
|
||||
vm_ref = _get_mor_by_property(vim.VirtualMachine, name)
|
||||
|
Loading…
Reference in New Issue
Block a user