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

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