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