mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 09:42:15 +03:00
util execute command returns formatted byte to string
This commit is contained in:
parent
22f11cfc3f
commit
bc82870f2b
1 changed files with 2 additions and 2 deletions
|
@ -121,8 +121,8 @@ class Util:
|
|||
process = subprocess.Popen(command, stdin=stdin, env=env, cwd=cwd, stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=shell)
|
||||
|
||||
result_code = process.wait()
|
||||
p_out = ', '.join([str(x) for x in process.stdout.readlines()])
|
||||
p_err = ', '.join([str(x) for x in process.stderr.readlines()])
|
||||
p_out = process.stdout.read().decode("unicode_escape")
|
||||
p_err = process.stderr.read().decode("unicode_escape")
|
||||
|
||||
return result_code, p_out, p_err
|
||||
except Exception as e:
|
||||
|
|
Loading…
Reference in a new issue