diff options
Diffstat (limited to 'openstackclient/identity/v2_0')
| -rwxr-xr-x[-rw-r--r--] | openstackclient/identity/v2_0/project.py | 8 | ||||
| -rwxr-xr-x[-rw-r--r--] | openstackclient/identity/v2_0/role.py | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | openstackclient/identity/v2_0/user.py | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/openstackclient/identity/v2_0/project.py b/openstackclient/identity/v2_0/project.py index 6c5db13c..fc5c9201 100644..100755 --- a/openstackclient/identity/v2_0/project.py +++ b/openstackclient/identity/v2_0/project.py @@ -86,7 +86,7 @@ class CreateProject(command.ShowOne): enabled=enabled, **kwargs ) - except ks_exc.Conflict as e: + except ks_exc.Conflict: if parsed_args.or_show: project = utils.find_resource( identity_client.tenants, @@ -94,7 +94,7 @@ class CreateProject(command.ShowOne): ) LOG.info(_('Returning existing project %s'), project.name) else: - raise e + raise # TODO(stevemar): Remove the line below when we support multitenancy project._info.pop('parent_id', None) @@ -242,7 +242,7 @@ class ShowProject(command.ShowOne): parsed_args.project, ) info.update(project._info) - except ks_exc.Forbidden as e: + except ks_exc.Forbidden: auth_ref = self.app.client_manager.auth_ref if ( parsed_args.project == auth_ref.project_id or @@ -256,7 +256,7 @@ class ShowProject(command.ShowOne): 'enabled': True, } else: - raise e + raise # TODO(stevemar): Remove the line below when we support multitenancy info.pop('parent_id', None) diff --git a/openstackclient/identity/v2_0/role.py b/openstackclient/identity/v2_0/role.py index 6d06230c..191cdaa3 100644..100755 --- a/openstackclient/identity/v2_0/role.py +++ b/openstackclient/identity/v2_0/role.py @@ -93,7 +93,7 @@ class CreateRole(command.ShowOne): identity_client = self.app.client_manager.identity try: role = identity_client.roles.create(parsed_args.role_name) - except ks_exc.Conflict as e: + except ks_exc.Conflict: if parsed_args.or_show: role = utils.find_resource( identity_client.roles, @@ -101,7 +101,7 @@ class CreateRole(command.ShowOne): ) LOG.info(_('Returning existing role %s'), role.name) else: - raise e + raise info = {} info.update(role._info) diff --git a/openstackclient/identity/v2_0/user.py b/openstackclient/identity/v2_0/user.py index 0f327830..d2075150 100644..100755 --- a/openstackclient/identity/v2_0/user.py +++ b/openstackclient/identity/v2_0/user.py @@ -102,7 +102,7 @@ class CreateUser(command.ShowOne): tenant_id=project_id, enabled=enabled, ) - except ks_exc.Conflict as e: + except ks_exc.Conflict: if parsed_args.or_show: user = utils.find_resource( identity_client.users, @@ -110,7 +110,7 @@ class CreateUser(command.ShowOne): ) LOG.info(_('Returning existing user %s'), user.name) else: - raise e + raise # NOTE(dtroyer): The users.create() method wants 'tenant_id' but # the returned resource has 'tenantId'. Sigh. @@ -349,7 +349,7 @@ class ShowUser(command.ShowOne): parsed_args.user, ) info.update(user._info) - except ks_exc.Forbidden as e: + except ks_exc.Forbidden: auth_ref = self.app.client_manager.auth_ref if ( parsed_args.user == auth_ref.user_id or @@ -364,7 +364,7 @@ class ShowUser(command.ShowOne): 'enabled': True, } else: - raise e + raise if 'tenantId' in info: info.update( |
