diff options
author | Dirk Mueller <dirk@dmllr.de> | 2013-05-18 00:18:18 +0200 |
---|---|---|
committer | Dirk Mueller <dirk@dmllr.de> | 2013-06-01 09:57:31 +0200 |
commit | bf68a9592db4c90bc9421ce49c7c0766966d6e7e (patch) | |
tree | 0a02a49d60348af8cb74d9be59c7a961666b7f01 /nova/exception.py | |
parent | 5a510518d9e3097730466cfbf4ff25495c4a0302 (diff) | |
download | nova-bf68a9592db4c90bc9421ce49c7c0766966d6e7e.tar.gz nova-bf68a9592db4c90bc9421ce49c7c0766966d6e7e.tar.xz nova-bf68a9592db4c90bc9421ce49c7c0766966d6e7e.zip |
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
Diffstat (limited to 'nova/exception.py')
-rw-r--r-- | nova/exception.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/exception.py b/nova/exception.py index 94394d5f7..bbe5442f1 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -73,7 +73,7 @@ def wrap_exception(notifier=None, publisher_id=None, event_type=None, # contain confidential information. try: return f(self, context, *args, **kw) - except Exception, e: + except Exception as e: with excutils.save_and_reraise_exception(): if notifier: payload = dict(exception=e) |