mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Bug fixes for GCP modules (#54765)
This commit is contained in:
parent
688409128a
commit
9908b2fbf6
9 changed files with 55 additions and 53 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue