Blame SOURCES/bz1625164-fence_cisco_ucs-encode-POSTFIELDS.patch

6a3e49
From 70bd4ffa245ef7e8b7698228bab3b41c240d50d2 Mon Sep 17 00:00:00 2001
6a3e49
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
6a3e49
Date: Tue, 4 Sep 2018 12:35:07 +0200
6a3e49
Subject: [PATCH] fence_cisco_ucs: encode POSTFIELDS
6a3e49
6a3e49
---
6a3e49
 agents/cisco_ucs/fence_cisco_ucs.py | 2 +-
6a3e49
 1 file changed, 1 insertion(+), 1 deletion(-)
6a3e49
6a3e49
diff --git a/agents/cisco_ucs/fence_cisco_ucs.py b/agents/cisco_ucs/fence_cisco_ucs.py
6a3e49
index d509b3e0..ec311754 100644
6a3e49
--- a/agents/cisco_ucs/fence_cisco_ucs.py
6a3e49
+++ b/agents/cisco_ucs/fence_cisco_ucs.py
6a3e49
@@ -111,7 +111,7 @@ def send_command(opt, command, timeout):
6a3e49
 	web_buffer = io.BytesIO()
6a3e49
 	conn.setopt(pycurl.URL, url.encode("ascii"))
6a3e49
 	conn.setopt(pycurl.HTTPHEADER, ["Content-type: text/xml"])
6a3e49
-	conn.setopt(pycurl.POSTFIELDS, command)
6a3e49
+	conn.setopt(pycurl.POSTFIELDS, command.encode("ascii"))
6a3e49
 	conn.setopt(pycurl.WRITEFUNCTION, web_buffer.write)
6a3e49
 	conn.setopt(pycurl.TIMEOUT, timeout)
6a3e49
 	if "--ssl" in opt or "--ssl-secure" in opt: