Fix some compatibility issues with Python3
This commit is contained in:
parent
fc4e1a8529
commit
8f47f1dde7
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue