Bug fixes for GCP modules (#54765)

This commit is contained in:
The Magician 2019-04-03 10:31:08 -07:00 committed by ansibot
parent 688409128a
commit 9908b2fbf6
9 changed files with 55 additions and 53 deletions

View file

@ -62,16 +62,9 @@ def replace_resource_dict(item, value):
else:
if not item:
return item
if isinstance(item, dict):
else:
return item.get(value)
# Item could be a string or a string representing a dictionary.
try:
new_item = ast.literal_eval(item)
return replace_resource_dict(new_item, value)
except ValueError:
return item
# Handles all authentication and HTTP sessions for GCP API calls.
class GcpSession(object):