Port to Python 2.4: replace subprocess.check_call().
This commit is contained in:
parent
778c1e366b
commit
44726ecdea
|
@ -76,8 +76,12 @@ def backtick (cmd):
|
||||||
|
|
||||||
|
|
||||||
def run (cmd, **kwargs):
|
def run (cmd, **kwargs):
|
||||||
"""Run command and raise subprocess.CalledProcessError on error."""
|
"""Run command and raise PatoolError on error."""
|
||||||
subprocess.check_call(cmd, **kwargs)
|
retcode = subprocess.call(cmd, **kwargs)
|
||||||
|
if retcode:
|
||||||
|
msg = "Command `%s' returned non-zero exit status %d" % (cmd, retcode)
|
||||||
|
raise PatoolError(msg)
|
||||||
|
return retcode
|
||||||
|
|
||||||
|
|
||||||
@memoized
|
@memoized
|
||||||
|
|
Loading…
Reference in New Issue