Python 3 compatibility: fix has_key

For Python 3.0, has_key() isn't supported already, it can be
replaced with in.

Change-Id: I86344ac971b1e0c75abe5fdd2cddab884daedd9e
Closes-Bug: #1797770
changes/70/610370/5
zhulingjie 4 years ago committed by Michele Baldessari
parent c1bf5d8b10
commit c2b0cb5d5e
  1. 4
      extraconfig/tasks/instanceha/check-run-nova-compute

@ -144,7 +144,7 @@ def create_nova_connection(options):
insecure=options["insecure"],
region_name=region,
session=keystone_session, auth=keystone_auth,
http_log_debug=options.has_key("verbose"),
http_log_debug="verbose" in options,
endpoint_type=nova_endpoint_type)
else:
# OSP >= Ocata
@ -152,7 +152,7 @@ def create_nova_connection(options):
nova = client.Client(version,
region_name=region,
session=keystone_session, auth=keystone_auth,
http_log_debug=options.has_key("verbose"),
http_log_debug="verbose" in options,
endpoint_type=nova_endpoint_type)
try:

Loading…
Cancel
Save