Blame SOURCES/bz1712263-fence_rhevm-1-use-UTF8-encoding.patch

674a4f
From a77165d7c8caadf514462d359c6d564048c2c33a Mon Sep 17 00:00:00 2001
674a4f
From: Sandro <42254081+Numblesix@users.noreply.github.com>
674a4f
Date: Tue, 29 Jan 2019 13:29:52 +0100
674a4f
Subject: [PATCH] Changed Encoding to UTF-8
674a4f
674a4f
Starting from RHV/Ovirt 4.2 we saw issues with the agent(unable to fence) after switching to UTF-8 all worked again.
674a4f
---
674a4f
 agents/rhevm/fence_rhevm.py | 4 ++--
674a4f
 1 file changed, 2 insertions(+), 2 deletions(-)
674a4f
674a4f
diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py
674a4f
index 2a5107cc6..a1cdaf605 100644
674a4f
--- a/agents/rhevm/fence_rhevm.py
674a4f
+++ b/agents/rhevm/fence_rhevm.py
674a4f
@@ -88,7 +88,7 @@ def send_command(opt, command, method="GET"):
674a4f
 	## send command through pycurl
674a4f
 	conn = pycurl.Curl()
674a4f
 	web_buffer = io.BytesIO()
674a4f
-	conn.setopt(pycurl.URL, url.encode("ascii"))
674a4f
+	conn.setopt(pycurl.URL, url.encode("UTF-8"))
674a4f
 	conn.setopt(pycurl.HTTPHEADER, [
674a4f
 		"Version: 3",
674a4f
 		"Content-type: application/xml",
674a4f
@@ -128,7 +128,7 @@ def send_command(opt, command, method="GET"):
674a4f
 
674a4f
 		opt["cookie"] = cookie
674a4f
 
674a4f
-	result = web_buffer.getvalue().decode()
674a4f
+	result = web_buffer.getvalue().decode("UTF-8")
674a4f
 
674a4f
 	logging.debug("%s\n", command)
674a4f
 	logging.debug("%s\n", result)