From 5f79373e1dff658aa48eef0e6fbb18fb193fe248 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 23 Jun 2013 15:06:32 +0200 Subject: Fix various Python 2.x->3.x compat issues Fix current git's Hacking H23x warnings via mechanical translation to avoid the easy Python 3.x compatibility issues. Change-Id: Ic94ef537b0722c8b65fc3fecc093dc0cb25673cc --- ironic/common/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ironic/common/utils.py') diff --git a/ironic/common/utils.py b/ironic/common/utils.py index 2130ecabf..5ec420e8e 100644 --- a/ironic/common/utils.py +++ b/ironic/common/utils.py @@ -185,7 +185,7 @@ def trycmd(*args, **kwargs): try: out, err = execute(*args, **kwargs) failed = False - except exception.ProcessExecutionError, exn: + except exception.ProcessExecutionError as exn: out, err = '', str(exn) failed = True @@ -490,7 +490,7 @@ def tempdir(**kwargs): finally: try: shutil.rmtree(tmpdir) - except OSError, e: + except OSError as e: LOG.error(_('Could not remove tmpdir: %s'), str(e)) -- cgit v1.2.1