Skip to content

Commit 010f7ce

Browse files
committed
Rework check_output text usage for python < 3.7
1 parent 860d005 commit 010f7ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/jmxutils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ def start(self):
216216
tries = 3
217217
for i in range(tries):
218218
try:
219-
subprocess.check_output(args, stderr=subprocess.STDOUT, text=True)
219+
subprocess.check_output(args, stderr=subprocess.STDOUT)
220220
logger.info("Jolokia successful on try %s" % i )
221221
return
222222
except subprocess.CalledProcessError as exc:
223-
if 'Jolokia is already attached' in exc.output:
223+
if 'Jolokia is already attached'.encode('utf-8') in exc.output:
224224
logger.info("Jolokia reports being attached on try %s, returning successfully" % i)
225225
return;
226226
if i < tries - 1:

0 commit comments

Comments
 (0)