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

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