Blame SOURCES/python3-has_key-fixes.patch

658b6c
From 29f93ed6f7f79cad801bf08ad9172c8a62183435 Mon Sep 17 00:00:00 2001
658b6c
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
658b6c
Date: Tue, 14 Aug 2018 12:33:41 +0200
658b6c
Subject: [PATCH] fence_compute/fence_evacuate/fence_rhevm: dont use has_key
658b6c
 (not supported in Python 3)
658b6c
658b6c
---
658b6c
 agents/compute/fence_compute.py   | 4 ++--
658b6c
 agents/evacuate/fence_evacuate.py | 4 ++--
658b6c
 agents/rhevm/fence_rhevm.py       | 4 ++--
658b6c
 3 files changed, 6 insertions(+), 6 deletions(-)
658b6c
658b6c
diff --git a/agents/compute/fence_compute.py b/agents/compute/fence_compute.py
658b6c
index ec2d093c..254e2670 100644
658b6c
--- a/agents/compute/fence_compute.py
658b6c
+++ b/agents/compute/fence_compute.py
658b6c
@@ -311,7 +311,7 @@ def create_nova_connection(options):
658b6c
 					     region_name=options["--region-name"],
658b6c
 					     endpoint_type=options["--endpoint-type"],
658b6c
 					     session=keystone_session, auth=keystone_auth,
658b6c
-					     http_log_debug=options.has_key("--verbose"))
658b6c
+					     http_log_debug="--verbose" in options)
658b6c
 		else:
658b6c
 			# OSP >= 11
658b6c
 			# ArgSpec(args=['version'], varargs='args', keywords='kwargs', defaults=None)
658b6c
@@ -319,7 +319,7 @@ def create_nova_connection(options):
658b6c
 					     region_name=options["--region-name"],
658b6c
 					     endpoint_type=options["--endpoint-type"],
658b6c
 					     session=keystone_session, auth=keystone_auth,
658b6c
-					     http_log_debug=options.has_key("--verbose"))
658b6c
+					     http_log_debug="--verbose" in options)
658b6c
 
658b6c
 		try:
658b6c
 			nova.hypervisors.list()
658b6c
diff --git a/agents/evacuate/fence_evacuate.py b/agents/evacuate/fence_evacuate.py
658b6c
index 615dede7..6818c44f 100644
658b6c
--- a/agents/evacuate/fence_evacuate.py
658b6c
+++ b/agents/evacuate/fence_evacuate.py
658b6c
@@ -245,7 +245,7 @@ def create_nova_connection(options):
658b6c
 					     region_name=options["--region-name"],
658b6c
 					     endpoint_type=options["--endpoint-type"],
658b6c
 					     session=keystone_session, auth=keystone_auth,
658b6c
-					     http_log_debug=options.has_key("--verbose"))
658b6c
+					     http_log_debug="--verbose" in options)
658b6c
 		else:
658b6c
 			# OSP >= 11
658b6c
 			# ArgSpec(args=['version'], varargs='args', keywords='kwargs', defaults=None)
658b6c
@@ -253,7 +253,7 @@ def create_nova_connection(options):
658b6c
 					     region_name=options["--region-name"],
658b6c
 					     endpoint_type=options["--endpoint-type"],
658b6c
 					     session=keystone_session, auth=keystone_auth,
658b6c
-					     http_log_debug=options.has_key("--verbose"))
658b6c
+					     http_log_debug="--verbose" in options)
658b6c
 
658b6c
 		try:
658b6c
 			nova.hypervisors.list()
658b6c
diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py
658b6c
index 0594e66b..c06b7c39 100644
658b6c
--- a/agents/rhevm/fence_rhevm.py
658b6c
+++ b/agents/rhevm/fence_rhevm.py
658b6c
@@ -74,11 +74,11 @@ def send_command(opt, command, method="GET"):
658b6c
 		url = "https:"
658b6c
 	else:
658b6c
 		url = "http:"
658b6c
-	if opt.has_key("--api-path"):
658b6c
+	if "--api-path" in opt:
658b6c
 		api_path = opt["--api-path"]
658b6c
 	else:
658b6c
 		api_path = "/ovirt-engine/api"
658b6c
-	if opt.has_key("--disable-http-filter"):
658b6c
+	if "--disable-http-filter" in opt:
658b6c
 		http_filter = 'false'
658b6c
 	else:
658b6c
 		http_filter = 'true'