From 1dbba71e00e34a01dd22c2930e70ec3fd68a5295 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 7 Jun 2013 15:50:39 +0200 Subject: [PATCH] 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 --- openstack/common/processutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack/common/processutils.py b/openstack/common/processutils.py index 1aa1335..02cfada 100644 --- a/openstack/common/processutils.py +++ b/openstack/common/processutils.py @@ -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