summaryrefslogtreecommitdiffstats
path: root/openstack/common/rpc/common.py
diff options
context:
space:
mode:
authorDirk Mueller <dirk@dmllr.de>2013-04-22 03:42:48 +0200
committerDirk Mueller <dirk@dmllr.de>2013-04-22 03:42:48 +0200
commit120ddeff7e1b8956fe35a7a39fae87ddcac8301c (patch)
treeb4eb9b278beca16004e6b1825d8173783390540a /openstack/common/rpc/common.py
parent67767b3e8074e4b4a218d7649ef2297c124c342f (diff)
Improve Python 3.x compatibility
Mechanical translation of deprecated constructs to 3.x compatible variants. Change-Id: I4988d0ac656903e0d0320aaa8361d4eeb774a0f9
Diffstat (limited to 'openstack/common/rpc/common.py')
-rw-r--r--openstack/common/rpc/common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openstack/common/rpc/common.py b/openstack/common/rpc/common.py
index 6fb39e1..2bc7c61 100644
--- a/openstack/common/rpc/common.py
+++ b/openstack/common/rpc/common.py
@@ -276,7 +276,7 @@ def _safe_log(log_func, msg, msg_data):
for elem in arg[:-1]:
d = d[elem]
d[arg[-1]] = '<SANITIZED>'
- except KeyError, e:
+ except KeyError as e:
LOG.info(_('Failed to sanitize %(item)s. Key error %(err)s'),
{'item': arg,
'err': e})
@@ -419,7 +419,7 @@ class ClientException(Exception):
def catch_client_exception(exceptions, func, *args, **kwargs):
try:
return func(*args, **kwargs)
- except Exception, e:
+ except Exception as e:
if type(e) in exceptions:
raise ClientException()
else: