py3 Popen text mode fix
This commit is contained in:
parent
1427b3e850
commit
0cfb2c0280
1 changed files with 2 additions and 2 deletions
|
|
@ -548,11 +548,11 @@ def run(cmd, chdir=None, fatal=False, log=True):
|
|||
logger = logging.getLogger('koji.vm')
|
||||
logger.info('$ %s', ' '.join(cmd))
|
||||
proc = subprocess.Popen(cmd, stdout=logfd, stderr=subprocess.STDOUT,
|
||||
close_fds=True)
|
||||
close_fds=True, text=True)
|
||||
ret = proc.wait()
|
||||
else:
|
||||
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||
close_fds=True)
|
||||
close_fds=True, text=True)
|
||||
output, dummy = proc.communicate()
|
||||
ret = proc.returncode
|
||||
if olddir:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue