Skip to content
Snippets Groups Projects
Commit 19a0126f authored by Anael Beutot's avatar Anael Beutot
Browse files

Make subproc_call to use our EvPopen class

parent 84920503
No related branches found
No related tags found
No related merge requests found
......@@ -179,13 +179,14 @@ class EvPopen(subprocess.Popen):
# libev handles zombies
def subproc_call(args, stdin=None):
def subproc_call(main_loop, args, stdin=None):
"""
:param args: arguments for subprocess call
:param stdin: stdin data as string
"""
proc = subprocess.Popen(args, bufsize=4096, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
proc = EvPopen(main_loop, args, bufsize=4096, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
close_fds=True)
result, _ = proc.communicate(stdin)
if proc.returncode != 0:
raise subprocess.CalledProcessError(proc.returncode,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment