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

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