mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Fix deprecation warnings in the Google modules.
This commit is contained in:
@@ -152,7 +152,7 @@ except ImportError:
|
||||
ARGS = getattr(secrets, 'GCE_PARAMS', ())
|
||||
KWARGS = getattr(secrets, 'GCE_KEYWORD_PARAMS', {})
|
||||
|
||||
if not ARGS or not KWARGS.has_key('project'):
|
||||
if not ARGS or not 'project' in KWARGS:
|
||||
print("failed=True msg='Missing GCE connection " + \
|
||||
"parameters in libcloud secrets file.'")
|
||||
sys.exit(1)
|
||||
@@ -290,7 +290,7 @@ def main():
|
||||
json_output['external_ip'] = lb.ip
|
||||
json_output['port_range'] = lb.port
|
||||
hc_names = []
|
||||
if lb.extra.has_key('healthchecks'):
|
||||
if 'healthchecks' in lb.extra:
|
||||
for hc in lb.extra['healthchecks']:
|
||||
hc_names.append(hc.name)
|
||||
json_output['httphealthchecks'] = hc_names
|
||||
|
||||
Reference in New Issue
Block a user