Repository: cassandra-dtest
Updated Branches:
  refs/heads/master 2c1b986bc -> 0b4f34a9a


tools/jmxutils.py decode bytes to string before passing to json.loads

Patch by Patrick Bannister; reviewed by marcuse for CASSANDRA-14320

Closes #21


Project: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/commit/5057b827
Tree: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/tree/5057b827
Diff: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/diff/5057b827

Branch: refs/heads/master
Commit: 5057b8273cddfeff1788fd2861de4ac1c80369cf
Parents: 2c1b986
Author: Patrick Bannister <ptbannis...@gmail.com>
Authored: Sat Mar 17 03:32:50 2018 +0000
Committer: Marcus Eriksson <marc...@apache.org>
Committed: Thu Mar 22 10:39:57 2018 +0100

----------------------------------------------------------------------
 tools/jmxutils.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra-dtest/blob/5057b827/tools/jmxutils.py
----------------------------------------------------------------------
diff --git a/tools/jmxutils.py b/tools/jmxutils.py
index 83459e0..8c78022 100644
--- a/tools/jmxutils.py
+++ b/tools/jmxutils.py
@@ -22,7 +22,7 @@ def jolokia_classpath():
         return CLASSPATH_SEP.join((tools_jar, JOLOKIA_JAR))
     else:
         logger.warning("Environment variable $JAVA_HOME not present: jmx-based 
" +
-                "tests may fail because of missing $JAVA_HOME/lib/tools.jar.")
+                       "tests may fail because of missing 
$JAVA_HOME/lib/tools.jar.")
         return JOLOKIA_JAR
 
 
@@ -237,7 +237,7 @@ class JolokiaAgent(object):
             raise Exception("Failed to query Jolokia agent; HTTP response 
code: %d; response: %s" % (response.code, response.readlines()))
 
         raw_response = response.readline()
-        response = json.loads(raw_response)
+        response = json.loads(raw_response.decode(encoding='utf-8'))
         if response['status'] != 200:
             stacktrace = response.get('stacktrace')
             if stacktrace and verbose:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to