Fix some compatibility issues with Python3

This commit is contained in:
Marian Csontos 2024-01-18 11:37:46 +01:00
parent fc4e1a8529
commit 8f47f1dde7

View File

@ -14,7 +14,6 @@
#
# Author: Bruno Goncalves <bgoncalv@redhat.com>
from os import walk
import subprocess
import sys
import re
@ -25,7 +24,10 @@ def run(cmd):
stdout, stderr = p.communicate()
retcode = p.returncode
output = stdout + stderr
output = stdout.decode('ascii', 'ignore') + stderr.decode('ascii', 'ignore')
# remove new line from last line
output = output.rstrip()
print(output)
return retcode, output