summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keystoneclient/service_catalog.py2
-rw-r--r--keystoneclient/shell.py2
-rw-r--r--keystoneclient/v2_0/client.py2
-rwxr-xr-xkeystoneclient/v2_0/shell.py8
4 files changed, 7 insertions, 7 deletions
diff --git a/keystoneclient/service_catalog.py b/keystoneclient/service_catalog.py
index cbe5c5d..11da572 100644
--- a/keystoneclient/service_catalog.py
+++ b/keystoneclient/service_catalog.py
@@ -42,7 +42,7 @@ class ServiceCatalog(object):
try:
token['user_id'] = self.catalog['user']['id']
token['tenant_id'] = self.catalog['token']['tenant']['id']
- except:
+ except Exception:
# just leave the tenant and user out if it doesn't exist
pass
return token
diff --git a/keystoneclient/shell.py b/keystoneclient/shell.py
index e61bf2e..6e28268 100644
--- a/keystoneclient/shell.py
+++ b/keystoneclient/shell.py
@@ -409,7 +409,7 @@ def main():
try:
OpenStackIdentityShell().main(sys.argv[1:])
- except Exception, e:
+ except Exception as e:
if httplib2.debuglevel == 1:
raise # dump stack.
else:
diff --git a/keystoneclient/v2_0/client.py b/keystoneclient/v2_0/client.py
index 02fd59b..37ab3d8 100644
--- a/keystoneclient/v2_0/client.py
+++ b/keystoneclient/v2_0/client.py
@@ -111,7 +111,7 @@ class Client(client.HTTPClient):
except (exceptions.AuthorizationFailure, exceptions.Unauthorized):
_logger.debug("Authorization Failed.")
raise
- except Exception, e:
+ except Exception as e:
raise exceptions.AuthorizationFailure("Authorization Failed: "
"%s" % e)
diff --git a/keystoneclient/v2_0/shell.py b/keystoneclient/v2_0/shell.py
index 07968e9..a976134 100755
--- a/keystoneclient/v2_0/shell.py
+++ b/keystoneclient/v2_0/shell.py
@@ -96,7 +96,7 @@ def do_user_update(kc, args):
try:
kc.users.update(args.id, **kwargs)
print 'User has been updated.'
- except Exception, e:
+ except Exception as e:
print 'Unable to update user: %s' % e
@@ -321,7 +321,7 @@ def do_ec2_credentials_list(kc, args):
for cred in credentials:
try:
cred.tenant = getattr(kc.tenants.get(cred.tenant_id), 'name')
- except:
+ except Exception:
# FIXME(dtroyer): Retrieving the tenant name fails for normal
# users; stuff in the tenant_id instead.
cred.tenant = cred.tenant_id
@@ -340,7 +340,7 @@ def do_ec2_credentials_delete(kc, args):
try:
kc.ec2.delete(args.user_id, args.access)
print 'Credential has been deleted.'
- except Exception, e:
+ except Exception as e:
print 'Unable to delete credential: %s' % e
@@ -419,7 +419,7 @@ def do_endpoint_delete(kc, args):
try:
kc.endpoints.delete(args.id)
print 'Endpoint has been deleted.'
- except:
+ except Exception:
print 'Unable to delete endpoint.'