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