Blame SOURCES/bz1696584-fence_gce-fix-python3-encoding-issue.patch

77640d
From 64ac6207152508392690b7c1dfcac3fe0a76adfd Mon Sep 17 00:00:00 2001
77640d
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
77640d
Date: Fri, 5 Apr 2019 09:48:52 +0200
77640d
Subject: [PATCH] fence_gce: fix Python 3 encoding issue
77640d
77640d
---
77640d
 agents/gce/fence_gce.py | 2 +-
77640d
 1 file changed, 1 insertion(+), 1 deletion(-)
77640d
77640d
diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py
77640d
index 93cd11801..b171710d9 100644
77640d
--- a/agents/gce/fence_gce.py
77640d
+++ b/agents/gce/fence_gce.py
77640d
@@ -146,7 +146,7 @@ def get_metadata(metadata_key, params=None, timeout=None):
77640d
 	url = '%s?%s' % (metadata_url, params)
77640d
 	request = urlrequest.Request(url, headers=METADATA_HEADERS)
77640d
 	request_opener = urlrequest.build_opener(urlrequest.ProxyHandler({}))
77640d
-	return request_opener.open(request, timeout=timeout * 1.1).read()
77640d
+	return request_opener.open(request, timeout=timeout * 1.1).read().decode("utf-8")
77640d
 
77640d
 
77640d
 def define_new_opts():