From 560831752ede7c967737b39762817182b8622cbc Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Tue, 10 Jan 2017 17:18:51 +0100 Subject: [PATCH] Defined get_exception() (#20087) This fixes #20080 --- lib/ansible/modules/cloud/vmware/vmware_guest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest.py b/lib/ansible/modules/cloud/vmware/vmware_guest.py index 9d43e535c3..d8c246b548 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest.py @@ -740,8 +740,8 @@ class PyVmomiHelper(object): 'msg': 'Cannot suspend VM in the current state %s' % current_state} except Exception: - result = {'changed': False, 'failed': True, - 'msg': get_exception()} + e = get_exception() + result = {'changed': False, 'failed': True, 'msg': e} if task: self.wait_for_task(task)