|
|
2d8bb4 |
From 965924fe8bf7dcd0bc15fb0e9265ab49bb8a5dd8 Mon Sep 17 00:00:00 2001
|
|
|
2d8bb4 |
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
|
2d8bb4 |
Date: Mon, 20 May 2019 15:49:39 +0200
|
|
|
2d8bb4 |
Subject: [PATCH] fence_rhevm: fix debug encoding issues
|
|
|
2d8bb4 |
|
|
|
2d8bb4 |
Tested with UTF-8 encoded comment in result, which caused this issue,
|
|
|
2d8bb4 |
and added to command and url in case they are in UTF-8 decoded state.
|
|
|
2d8bb4 |
---
|
|
|
2d8bb4 |
agents/rhevm/fence_rhevm.py | 6 +++---
|
|
|
2d8bb4 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
2d8bb4 |
|
|
|
2d8bb4 |
diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py
|
|
|
2d8bb4 |
index 6012c423..9e4650cd 100644
|
|
|
2d8bb4 |
--- a/agents/rhevm/fence_rhevm.py
|
|
|
2d8bb4 |
+++ b/agents/rhevm/fence_rhevm.py
|
|
|
2d8bb4 |
@@ -144,9 +144,9 @@ def send_command(opt, command, method="GET"):
|
|
|
2d8bb4 |
|
|
|
2d8bb4 |
result = web_buffer.getvalue().decode("UTF-8")
|
|
|
2d8bb4 |
|
|
|
2d8bb4 |
- logging.debug("url: %s\n", url)
|
|
|
2d8bb4 |
- logging.debug("command: %s\n", command)
|
|
|
2d8bb4 |
- logging.debug("result: %s\n", result)
|
|
|
2d8bb4 |
+ logging.debug("url: %s\n", url.encode("UTF-8"))
|
|
|
2d8bb4 |
+ logging.debug("command: %s\n", command.encode("UTF-8"))
|
|
|
2d8bb4 |
+ logging.debug("result: %s\n", result.encode("UTF-8"))
|
|
|
2d8bb4 |
|
|
|
2d8bb4 |
return result
|
|
|
2d8bb4 |
|
|
|
2d8bb4 |
--
|
|
|
2d8bb4 |
2.21.0
|
|
|
2d8bb4 |
|