Fix deprecation warnings in the Google modules.

This commit is contained in:
Michael DeHaan
2013-10-19 12:57:47 -04:00
parent d73f5a4df0
commit aa93ce2dc2
4 changed files with 11 additions and 10 deletions

View File

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