From c2b0cb5d5e79d7eea3cf9ffadb730d92bb19519c Mon Sep 17 00:00:00 2001 From: zhulingjie Date: Mon, 8 Oct 2018 01:34:55 -0400 Subject: [PATCH] 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 --- extraconfig/tasks/instanceha/check-run-nova-compute | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extraconfig/tasks/instanceha/check-run-nova-compute b/extraconfig/tasks/instanceha/check-run-nova-compute index dd8342a337..caa2b3e2f6 100755 --- a/extraconfig/tasks/instanceha/check-run-nova-compute +++ b/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: