Show More
@@ -14,8 +14,16 b'' | |||||
14 | # to compare performance. |
|
14 | # to compare performance. | |
15 |
|
15 | |||
16 | import sys |
|
16 | import sys | |
17 |
from subprocess import check_call, |
|
17 | from subprocess import check_call, Popen, CalledProcessError, STDOUT, PIPE | |
18 |
|
18 | |||
|
19 | def check_output(*args, **kwargs): | |||
|
20 | kwargs.setdefault('stderr', PIPE) | |||
|
21 | kwargs.setdefault('stdout', PIPE) | |||
|
22 | proc = Popen(*args, **kwargs) | |||
|
23 | output, error = proc.communicate() | |||
|
24 | if proc.returncode != 0: | |||
|
25 | raise CalledProcessError(proc.returncode, ' '.join(args)) | |||
|
26 | return output | |||
19 |
|
27 | |||
20 | def update(rev): |
|
28 | def update(rev): | |
21 | """update the repo to a revision""" |
|
29 | """update the repo to a revision""" |
General Comments 0
You need to be logged in to leave comments.
Login now