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

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