diff options
author | Dirk Mueller <dirk@dmllr.de> | 2013-06-23 15:06:32 +0200 |
---|---|---|
committer | Dirk Mueller <dirk@dmllr.de> | 2013-06-23 15:06:32 +0200 |
commit | 5f79373e1dff658aa48eef0e6fbb18fb193fe248 (patch) | |
tree | d7b3832a133811c97aa8c099716f3158116d76c6 /ironic/common/utils.py | |
parent | d4a4d1d4b2dda99f9d2a0343524e1b1eda86994a (diff) | |
download | ironic-5f79373e1dff658aa48eef0e6fbb18fb193fe248.tar.gz |
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
Diffstat (limited to 'ironic/common/utils.py')
-rw-r--r-- | ironic/common/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
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)) |