summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-06-05 13:42:43 +0000
committerGerrit Code Review <review@openstack.org>2013-06-05 13:42:43 +0000
commit09adc96f8fdf923a2aa377f408b956cb8fba3097 (patch)
tree8d52eb4a83242286bef1cc73cd06f1bace8b0490 /nova/utils.py
parent17cbb833aba3bedab8eb80ed89a76bdd52a94ce7 (diff)
parentbf68a9592db4c90bc9421ce49c7c0766966d6e7e (diff)
downloadnova-09adc96f8fdf923a2aa377f408b956cb8fba3097.tar.gz
nova-09adc96f8fdf923a2aa377f408b956cb8fba3097.tar.xz
nova-09adc96f8fdf923a2aa377f408b956cb8fba3097.zip
Merge "Improve Python 3.x compatibility"
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/utils.py b/nova/utils.py
index f54e72d63..2b488a7e7 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -930,7 +930,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))
@@ -1010,7 +1010,7 @@ def last_bytes(file_like_object, num):
try:
file_like_object.seek(-num, os.SEEK_END)
- except IOError, e:
+ except IOError as e:
if e.errno == 22:
file_like_object.seek(0, os.SEEK_SET)
else:
@@ -1077,7 +1077,7 @@ class ExceptionHelper(object):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
- except rpc_common.ClientException, e:
+ except rpc_common.ClientException as e:
raise (e._exc_info[1], None, e._exc_info[2])
return wrapper