From fc24f37ae28e1b7f6b9587a8062a314d660a0136 Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Mon, 7 Mar 2016 17:54:06 +0800 Subject: [PATCH] Trivial: Remove useless return If a function returns nothing, do not add return in the end. Change-Id: I298b8717462f68d3076a1619d674775be2a94c42 --- openstackclient/common/clientmanager.py | 2 -- openstackclient/identity/v2_0/endpoint.py | 1 - openstackclient/identity/v2_0/project.py | 3 --- openstackclient/identity/v2_0/role.py | 1 - openstackclient/identity/v2_0/service.py | 1 - openstackclient/identity/v2_0/token.py | 1 - openstackclient/identity/v2_0/user.py | 2 -- openstackclient/network/v2/network.py | 1 - openstackclient/network/v2/security_group.py | 1 - 9 files changed, 13 deletions(-) diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py index 938dd05cee..56ddcbad77 100644 --- a/openstackclient/common/clientmanager.py +++ b/openstackclient/common/clientmanager.py @@ -199,8 +199,6 @@ class ClientManager(object): self._auth_setup_completed = True - return - @property def auth_ref(self): """Dereference will trigger an auth if it hasn't already""" diff --git a/openstackclient/identity/v2_0/endpoint.py b/openstackclient/identity/v2_0/endpoint.py index 08c09565dd..e92f54127a 100644 --- a/openstackclient/identity/v2_0/endpoint.py +++ b/openstackclient/identity/v2_0/endpoint.py @@ -87,7 +87,6 @@ class DeleteEndpoint(command.Command): def take_action(self, parsed_args): identity_client = self.app.client_manager.identity identity_client.endpoints.delete(parsed_args.endpoint) - return class ListEndpoint(command.Lister): diff --git a/openstackclient/identity/v2_0/project.py b/openstackclient/identity/v2_0/project.py index 9e26c308b4..71c77623ea 100644 --- a/openstackclient/identity/v2_0/project.py +++ b/openstackclient/identity/v2_0/project.py @@ -119,7 +119,6 @@ class DeleteProject(command.Command): project, ) identity_client.tenants.delete(project_obj.id) - return class ListProject(command.Lister): @@ -222,7 +221,6 @@ class SetProject(command.Command): del kwargs['name'] identity_client.tenants.update(project.id, **kwargs) - return class ShowProject(command.ShowOne): @@ -317,4 +315,3 @@ class UnsetProject(command.Command): if key in kwargs: kwargs[key] = None identity_client.tenants.update(project.id, **kwargs) - return diff --git a/openstackclient/identity/v2_0/role.py b/openstackclient/identity/v2_0/role.py index 892ce006e5..01c340896b 100644 --- a/openstackclient/identity/v2_0/role.py +++ b/openstackclient/identity/v2_0/role.py @@ -126,7 +126,6 @@ class DeleteRole(command.Command): role, ) identity_client.roles.delete(role_obj.id) - return class ListRole(command.Lister): diff --git a/openstackclient/identity/v2_0/service.py b/openstackclient/identity/v2_0/service.py index 3af85d7db0..0b1e8dbdae 100644 --- a/openstackclient/identity/v2_0/service.py +++ b/openstackclient/identity/v2_0/service.py @@ -101,7 +101,6 @@ class DeleteService(command.Command): identity_client = self.app.client_manager.identity service = common.find_service(identity_client, parsed_args.service) identity_client.services.delete(service.id) - return class ListService(command.Lister): diff --git a/openstackclient/identity/v2_0/token.py b/openstackclient/identity/v2_0/token.py index 6a66a1c6d7..1ccf2f261d 100644 --- a/openstackclient/identity/v2_0/token.py +++ b/openstackclient/identity/v2_0/token.py @@ -55,4 +55,3 @@ class RevokeToken(command.Command): identity_client = self.app.client_manager.identity identity_client.tokens.delete(parsed_args.token) - return diff --git a/openstackclient/identity/v2_0/user.py b/openstackclient/identity/v2_0/user.py index 3d848737e5..fc868bab70 100644 --- a/openstackclient/identity/v2_0/user.py +++ b/openstackclient/identity/v2_0/user.py @@ -143,7 +143,6 @@ class DeleteUser(command.Command): user, ) identity_client.users.delete(user_obj.id) - return class ListUser(command.Lister): @@ -330,7 +329,6 @@ class SetUser(command.Command): kwargs['enabled'] = False identity_client.users.update(user.id, **kwargs) - return class ShowUser(command.ShowOne): diff --git a/openstackclient/network/v2/network.py b/openstackclient/network/v2/network.py index 308e0e5249..678656426f 100644 --- a/openstackclient/network/v2/network.py +++ b/openstackclient/network/v2/network.py @@ -338,7 +338,6 @@ class SetNetwork(command.Command): raise exceptions.CommandError(msg) client.update_network(obj, **attrs) - return class ShowNetwork(common.NetworkAndComputeShowOne): diff --git a/openstackclient/network/v2/security_group.py b/openstackclient/network/v2/security_group.py index 9cefb42066..62699ffd3d 100644 --- a/openstackclient/network/v2/security_group.py +++ b/openstackclient/network/v2/security_group.py @@ -123,7 +123,6 @@ class SetSecurityGroup(common.NetworkAndComputeCommand): # if there were no updates. Maintain this behavior and issue # the update. client.update_security_group(obj, **attrs) - return def take_action_compute(self, client, parsed_args): data = utils.find_resource(