Merge pull request #13146 from nitzmahone/gce_error_messaging

fix gce module error reporting
This commit is contained in:
James Cammarata 2015-11-13 08:46:51 -05:00
commit 31b1abf580

View file

@ -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))