mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue