From c5fa9e9351dd099c257e2a05db224916cb896e83 Mon Sep 17 00:00:00 2001 From: rallytime Date: Fri, 11 Dec 2015 16:53:29 -0700 Subject: [PATCH] Don't stacktrace on kwargs.get if kwargs=None Fixes #29488 --- salt/cloud/clouds/vmware.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/salt/cloud/clouds/vmware.py b/salt/cloud/clouds/vmware.py index 1ac06776f2..b10fca51d1 100644 --- a/salt/cloud/clouds/vmware.py +++ b/salt/cloud/clouds/vmware.py @@ -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)