Skip to content

Commit 3372de6

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "take_action() method from command.Command shouldn't return"
2 parents 5310cfb + 3d74304 commit 3372de6

16 files changed

Lines changed: 18 additions & 43 deletions

openstackclient/identity/v3/consumer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def take_action(self, parsed_args):
6060
consumer = utils.find_resource(
6161
identity_client.oauth1.consumers, parsed_args.consumer)
6262
identity_client.oauth1.consumers.delete(consumer.id)
63-
return
6463

6564

6665
class ListConsumer(command.Lister):
@@ -107,7 +106,6 @@ def take_action(self, parsed_args):
107106

108107
consumer = identity_client.oauth1.consumers.update(
109108
consumer.id, **kwargs)
110-
return
111109

112110

113111
class ShowConsumer(command.ShowOne):

openstackclient/identity/v3/credential.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def get_parser(self, prog_name):
8484
def take_action(self, parsed_args):
8585
identity_client = self.app.client_manager.identity
8686
identity_client.credentials.delete(parsed_args.credential)
87-
return
8887

8988

9089
class ListCredential(command.Lister):
@@ -155,8 +154,6 @@ def take_action(self, parsed_args):
155154
blob=parsed_args.data,
156155
project=project)
157156

158-
return
159-
160157

161158
class ShowCredential(command.ShowOne):
162159
"""Show credential command"""

openstackclient/identity/v3/domain.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ def take_action(self, parsed_args):
100100
domain = utils.find_resource(identity_client.domains,
101101
parsed_args.domain)
102102
identity_client.domains.delete(domain.id)
103-
return
104103

105104

106105
class ListDomain(command.Lister):
@@ -168,7 +167,6 @@ def take_action(self, parsed_args):
168167
sys.stdout.write("Domain not updated, no arguments present")
169168
return
170169
identity_client.domains.update(domain.id, **kwargs)
171-
return
172170

173171

174172
class ShowDomain(command.ShowOne):

openstackclient/identity/v3/endpoint.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ def take_action(self, parsed_args):
109109
endpoint_id = utils.find_resource(identity_client.endpoints,
110110
parsed_args.endpoint).id
111111
identity_client.endpoints.delete(endpoint_id)
112-
return
113112

114113

115114
class ListEndpoint(command.Lister):
@@ -221,7 +220,6 @@ def take_action(self, parsed_args):
221220
if parsed_args.service:
222221
service = common.find_service(identity_client, parsed_args.service)
223222
service_id = service.id
224-
225223
enabled = None
226224
if parsed_args.enabled:
227225
enabled = True
@@ -237,8 +235,6 @@ def take_action(self, parsed_args):
237235
enabled=enabled
238236
)
239237

240-
return
241-
242238

243239
class ShowEndpoint(command.ShowOne):
244240
"""Display endpoint details"""

openstackclient/identity/v3/federation_protocol.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def take_action(self, parsed_args):
8383
identity_client = self.app.client_manager.identity
8484
identity_client.federation.protocols.delete(
8585
parsed_args.identity_provider, parsed_args.federation_protocol)
86-
return
8786

8887

8988
class ListProtocols(command.Lister):

openstackclient/identity/v3/group.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ def take_action(self, parsed_args):
182182
group,
183183
parsed_args.domain)
184184
identity_client.groups.delete(group_obj.id)
185-
return
186185

187186

188187
class ListGroup(command.Lister):
@@ -322,7 +321,6 @@ def take_action(self, parsed_args):
322321
sys.stderr.write("Group not updated, no arguments present")
323322
return
324323
identity_client.groups.update(group.id, **kwargs)
325-
return
326324

327325

328326
class ShowGroup(command.ShowOne):

openstackclient/identity/v3/identity_provider.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ def take_action(self, parsed_args):
102102
identity_client = self.app.client_manager.identity
103103
identity_client.federation.identity_providers.delete(
104104
parsed_args.identity_provider)
105-
return
106105

107106

108107
class ListIdentityProvider(command.Lister):

openstackclient/identity/v3/mapping.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ def take_action(self, parsed_args):
121121
identity_client = self.app.client_manager.identity
122122

123123
identity_client.federation.mappings.delete(parsed_args.mapping)
124-
return
125124

126125

127126
class ListMapping(command.Lister):

openstackclient/identity/v3/policy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def get_parser(self, prog_name):
6969
def take_action(self, parsed_args):
7070
identity_client = self.app.client_manager.identity
7171
identity_client.policies.delete(parsed_args.policy)
72-
return
7372

7473

7574
class ListPolicy(command.Lister):
@@ -139,7 +138,6 @@ def take_action(self, parsed_args):
139138
sys.stdout.write('Policy not updated, no arguments present \n')
140139
return
141140
identity_client.policies.update(parsed_args.policy, **kwargs)
142-
return
143141

144142

145143
class ShowPolicy(command.ShowOne):

openstackclient/identity/v3/project.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ def take_action(self, parsed_args):
153153
project_obj = utils.find_resource(identity_client.projects,
154154
project)
155155
identity_client.projects.delete(project_obj.id)
156-
return
157156

158157

159158
class ListProject(command.Lister):
@@ -267,8 +266,8 @@ def take_action(self, parsed_args):
267266
and not parsed_args.property
268267
and not parsed_args.disable):
269268
return
270-
271-
project = common.find_project(identity_client, parsed_args.project,
269+
project = common.find_project(identity_client,
270+
parsed_args.project,
272271
parsed_args.domain)
273272

274273
kwargs = {}
@@ -284,7 +283,6 @@ def take_action(self, parsed_args):
284283
kwargs.update(parsed_args.property)
285284

286285
identity_client.projects.update(project.id, **kwargs)
287-
return
288286

289287

290288
class ShowProject(command.ShowOne):

0 commit comments

Comments
 (0)