summaryrefslogtreecommitdiff
path: root/horizon/tables
diff options
context:
space:
mode:
authorDirk Mueller <dirk@dmllr.de>2013-06-14 23:19:28 +0200
committerDirk Mueller <dirk@dmllr.de>2013-06-14 23:19:28 +0200
commit315d30c33736d66fba278912c16291d124c9dd67 (patch)
treee0cd0dc6a6be06c2c3b3215b9ab8e84980d6c9d0 /horizon/tables
parentcea720e793777519dab542fdc4105dd456e000f6 (diff)
downloadhorizon-315d30c33736d66fba278912c16291d124c9dd67.tar.gz
Use Python 3.x compatible except construct
Python 3.x removed the "except x,y:" construct. Use "except x as y:" instead which works with all Python versions >= 2.6. Change-Id: Iedb4c5a6d8580cbb6c9697933d006e94b1db916d
Diffstat (limited to 'horizon/tables')
-rw-r--r--horizon/tables/actions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/horizon/tables/actions.py b/horizon/tables/actions.py
index 068408c4d..b6aa0a4ad 100644
--- a/horizon/tables/actions.py
+++ b/horizon/tables/actions.py
@@ -308,7 +308,7 @@ class LinkAction(BaseAction):
return urlresolvers.reverse(self.url, args=(obj_id,))
else:
return urlresolvers.reverse(self.url)
- except urlresolvers.NoReverseMatch, ex:
+ except urlresolvers.NoReverseMatch as ex:
LOG.info('No reverse found for "%s": %s' % (self.url, ex))
return self.url
@@ -574,7 +574,7 @@ class BatchAction(Action):
self.success_ids.append(datum_id)
LOG.info('%s: "%s"' %
(self._conjugate(past=True), datum_display))
- except Exception, ex:
+ except Exception as ex:
# Handle the exception but silence it since we'll display
# an aggregate error message later. Otherwise we'd get
# multiple error messages displayed to the user.