summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Cammarata <jimi@sngx.net>2015-11-13 14:46:51 +0100
committerJames Cammarata <jimi@sngx.net>2015-11-13 14:46:51 +0100
commit31b1abf580fd387c5205a43d10c519421454eeea (patch)
tree4a09bdfab01d555d2e6b0ab20fc9365ddea5057d
parentMerge pull request #13127 from willthames/test_become (diff)
parentfix gce module error reporting (diff)
downloadansible-31b1abf580fd387c5205a43d10c519421454eeea.tar.xz
ansible-31b1abf580fd387c5205a43d10c519421454eeea.zip
Merge pull request #13146 from nitzmahone/gce_error_messaging
fix gce module error reporting
-rw-r--r--lib/ansible/module_utils/gce.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/module_utils/gce.py b/lib/ansible/module_utils/gce.py
index dc3a32700c..ad72a9b82b 100644
--- a/lib/ansible/module_utils/gce.py
+++ b/lib/ansible/module_utils/gce.py
@@ -28,7 +28,7 @@
#
import os
-import pprint
+import traceback
from libcloud.compute.providers import get_driver
USER_AGENT_PRODUCT="Ansible-gce"
@@ -92,4 +92,4 @@ def gce_connect(module, provider=None):
def unexpected_error_msg(error):
"""Create an error string based on passed in error."""
- return 'Unexpected response: ' + pprint.pformat(vars(error))
+ return 'Unexpected response: (%s). Detail: %s' % (str(error), traceback.format_exc(error))