Skip to content

Commit

Permalink
Rework check_output text usage for python < 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
driftx committed Oct 24, 2022
1 parent 860d005 commit 010f7ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/jmxutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ def start(self):
tries = 3
for i in range(tries):
try:
subprocess.check_output(args, stderr=subprocess.STDOUT, text=True)
subprocess.check_output(args, stderr=subprocess.STDOUT)
logger.info("Jolokia successful on try %s" % i )
return
except subprocess.CalledProcessError as exc:
if 'Jolokia is already attached' in exc.output:
if 'Jolokia is already attached'.encode('utf-8') in exc.output:
logger.info("Jolokia reports being attached on try %s, returning successfully" % i)
return;
if i < tries - 1:
Expand Down

0 comments on commit 010f7ce

Please sign in to comment.