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