Blame SOURCES/fence_cisco_ucs-encode-POSTFIELDS.patch

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