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