py3: use new form for exception catching
This commit is contained in:
parent
8d1c3fc7d3
commit
1db6599f71
|
@ -135,7 +135,7 @@ def output(cmd, print_output=False, exit_on_error=True):
|
|||
output = subprocess.check_output(cmd,
|
||||
stderr=subprocess.STDOUT,
|
||||
shell=True)
|
||||
except subprocess.CalledProcessError, e:
|
||||
except subprocess.CalledProcessError as e:
|
||||
sys.stderr.write(e.output)
|
||||
if exit_on_error:
|
||||
error(cmd)
|
||||
|
|
Loading…
Reference in New Issue