Use Python 3.x compatible except construct

Per (proposed) Hacking H203 check, always use the
except x as y: construct, which works with any
Python version >= 2.6, including Python 3.x.

Change-Id: I46028647d5a2a53ba8e9ce4d2e8fc6e71850fdae
This commit is contained in:
Dirk Mueller 2013-06-07 15:50:39 +02:00
parent 74733fc3fe
commit 1dbba71e00
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ def trycmd(*args, **kwargs):
try:
out, err = execute(*args, **kwargs)
failed = False
except ProcessExecutionError, exn:
except ProcessExecutionError as exn:
out, err = '', str(exn)
failed = True