From bf68a9592db4c90bc9421ce49c7c0766966d6e7e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 18 May 2013 00:18:18 +0200 Subject: Improve Python 3.x compatibility Mechanical translation of the deprecated except x,y: construct with except x as y: The latter works with any Python >= 2.6. Add Hacking check. Change-Id: I845829d97d379c1cd9b3a77e7e5786586f263b64 --- nova/openstack/common/processutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/openstack') diff --git a/nova/openstack/common/processutils.py b/nova/openstack/common/processutils.py index de6179602..87d89b490 100644 --- a/nova/openstack/common/processutils.py +++ b/nova/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 -- cgit