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

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