summaryrefslogtreecommitdiff
path: root/keystoneclient/v2_0/shell.py
diff options
context:
space:
mode:
authorDolph Mathews <dolph.mathews@gmail.com>2012-11-05 10:13:25 -0600
committerDolph Mathews <dolph.mathews@gmail.com>2012-11-05 10:13:48 -0600
commit5804b8bd5095d4d18f615f07b937bac158c2434b (patch)
tree3eaa803ff56bbd926fbfa1ba77111bf3cbf8539c /keystoneclient/v2_0/shell.py
parent026dc8ef1b17b1a3aa2f7bf52786a49e6de995b2 (diff)
downloadpython-keystoneclient-5804b8bd5095d4d18f615f07b937bac158c2434b.tar.gz
HACKING compliance: consistent usage of 'except'
Change-Id: I13988e94d7e20a9179874ec5be072bdb8db3a95e
Diffstat (limited to 'keystoneclient/v2_0/shell.py')
-rwxr-xr-xkeystoneclient/v2_0/shell.py8
1 files changed, 4 insertions, 4 deletions
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.'