Blame SOURCES/fence_cisco_ucs-encode-POSTFIELDS.patch

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