mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 01:22:00 +00:00
Fix py2 compatibility of util
This commit is contained in:
parent
68bfb950f3
commit
d258a2ae0d
@ -30,11 +30,11 @@ import eventlet.green.subprocess as subprocess
|
||||
|
||||
|
||||
def run(cmd):
|
||||
with subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as process:
|
||||
stdout, stderr = process.communicate()
|
||||
retcode = process.poll()
|
||||
if retcode:
|
||||
raise subprocess.CalledProcessError(retcode, process.args, output=stdout, stderr=stderr)
|
||||
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
stdout, stderr = process.communicate()
|
||||
retcode = process.poll()
|
||||
if retcode:
|
||||
raise subprocess.CalledProcessError(retcode, process.args, output=stdout, stderr=stderr)
|
||||
return stdout, stderr
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user