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:
parent
74733fc3fe
commit
1dbba71e00
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user