Blame SOURCES/bz1816203-fence_aws-2-fix-python3-encoding.patch

bf99d3
From 9758f8c83c44ad6949d4411042c59bcf9365f67e Mon Sep 17 00:00:00 2001
bf99d3
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
bf99d3
Date: Tue, 24 Mar 2020 15:31:13 +0100
bf99d3
Subject: [PATCH] fence_aws: fix Python 3 encoding issue
bf99d3
bf99d3
---
bf99d3
 agents/aws/fence_aws.py | 2 +-
bf99d3
 1 file changed, 1 insertion(+), 1 deletion(-)
bf99d3
bf99d3
diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py
bf99d3
index ed55f390..17c2fedb 100644
bf99d3
--- a/agents/aws/fence_aws.py
bf99d3
+++ b/agents/aws/fence_aws.py
bf99d3
@@ -20,7 +20,7 @@
bf99d3
 def get_instance_id():
bf99d3
 	try:
bf99d3
 		r = requests.get('http://169.254.169.254/latest/meta-data/instance-id')
bf99d3
-		return r.content
bf99d3
+		return r.content.decode("UTF-8")
bf99d3
 	except HTTPError as http_err:
bf99d3
 		logger.error('HTTP error occurred while trying to access EC2 metadata server: %s', http_err)
bf99d3
 	except Exception as err: