py3: use new form for exception catching

This commit is contained in:
Frédéric Péters 2020-04-18 14:47:57 +02:00
parent 8d1c3fc7d3
commit 1db6599f71
1 changed files with 1 additions and 1 deletions

View File

@ -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)