Skip to content

Commit f560436

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Trivial: Remove useless return from files in image and volume"
2 parents 8d718e9 + f552302 commit f560436

File tree

11 files changed

+0
-44
lines changed

11 files changed

+0
-44
lines changed

openstackclient/image/v1/image.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,8 +679,6 @@ def take_action(self, parsed_args):
679679
kwargs['data'] != sys.stdin):
680680
kwargs['data'].close()
681681

682-
return
683-
684682

685683
class ShowImage(show.ShowOne):
686684
"""Display image details"""

openstackclient/volume/v1/backup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ def take_action(self, parsed_args):
9595
backup_id = utils.find_resource(volume_client.backups,
9696
backup).id
9797
volume_client.backups.delete(backup_id)
98-
return
9998

10099

101100
class ListBackup(lister.Lister):

openstackclient/volume/v1/qos_specs.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ def take_action(self, parsed_args):
5555

5656
volume_client.qos_specs.associate(qos_spec.id, volume_type.id)
5757

58-
return
59-
6058

6159
class CreateQos(show.ShowOne):
6260
"""Create new QoS specification"""
@@ -123,7 +121,6 @@ def take_action(self, parsed_args):
123121
for qos in parsed_args.qos_specs:
124122
qos_spec = utils.find_resource(volume_client.qos_specs, qos)
125123
volume_client.qos_specs.delete(qos_spec.id)
126-
return
127124

128125

129126
class DisassociateQos(command.Command):
@@ -166,8 +163,6 @@ def take_action(self, parsed_args):
166163
elif parsed_args.all:
167164
volume_client.qos_specs.disassociate_all(qos_spec.id)
168165

169-
return
170-
171166

172167
class ListQos(lister.Lister):
173168
"""List QoS specifications"""
@@ -230,8 +225,6 @@ def take_action(self, parsed_args):
230225
else:
231226
self.app.log.error("No changes requested\n")
232227

233-
return
234-
235228

236229
class ShowQos(show.ShowOne):
237230
"""Display QoS specification details"""
@@ -298,5 +291,3 @@ def take_action(self, parsed_args):
298291
parsed_args.property)
299292
else:
300293
self.app.log.error("No changes requested\n")
301-
302-
return

openstackclient/volume/v1/snapshot.py

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

105104

106105
class ListSnapshot(lister.Lister):
@@ -226,7 +225,6 @@ def take_action(self, parsed_args):
226225
return
227226

228227
snapshot.update(**kwargs)
229-
return
230228

231229

232230
class ShowSnapshot(show.ShowOne):
@@ -291,4 +289,3 @@ def take_action(self, parsed_args):
291289
)
292290
else:
293291
self.app.log.error("No changes requested\n")
294-
return

openstackclient/volume/v1/volume.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ def take_action(self, parsed_args):
196196
volume_client.volumes.force_delete(volume_obj.id)
197197
else:
198198
volume_client.volumes.delete(volume_obj.id)
199-
return
200199

201200

202201
class ListVolume(lister.Lister):
@@ -382,8 +381,6 @@ def take_action(self, parsed_args):
382381
if not kwargs and not parsed_args.property and not parsed_args.size:
383382
self.app.log.error("No changes requested\n")
384383

385-
return
386-
387384

388385
class ShowVolume(show.ShowOne):
389386
"""Show volume details"""
@@ -454,4 +451,3 @@ def take_action(self, parsed_args):
454451
)
455452
else:
456453
self.app.log.error("No changes requested\n")
457-
return

openstackclient/volume/v1/volume_type.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def take_action(self, parsed_args):
8181
volume_type_id = utils.find_resource(
8282
volume_client.volume_types, parsed_args.volume_type).id
8383
volume_client.volume_types.delete(volume_type_id)
84-
return
8584

8685

8786
class ListVolumeType(lister.Lister):
@@ -144,8 +143,6 @@ def take_action(self, parsed_args):
144143
if parsed_args.property:
145144
volume_type.set_keys(parsed_args.property)
146145

147-
return
148-
149146

150147
class UnsetVolumeType(command.Command):
151148
"""Unset volume type properties"""
@@ -182,7 +179,6 @@ def take_action(self, parsed_args):
182179
volume_type.unset_keys(parsed_args.property)
183180
else:
184181
self.app.log.error("No changes requested\n")
185-
return
186182

187183

188184
class ShowVolumeType(show.ShowOne):

openstackclient/volume/v2/backup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ def take_action(self, parsed_args):
9292
backup_id = utils.find_resource(
9393
volume_client.backups, backup).id
9494
volume_client.backups.delete(backup_id)
95-
return
9695

9796

9897
class ListBackup(lister.Lister):

openstackclient/volume/v2/qos_specs.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ def take_action(self, parsed_args):
5555

5656
volume_client.qos_specs.associate(qos_spec.id, volume_type.id)
5757

58-
return
59-
6058

6159
class CreateQos(show.ShowOne):
6260
"""Create new QoS specification"""
@@ -123,7 +121,6 @@ def take_action(self, parsed_args):
123121
for qos in parsed_args.qos_specs:
124122
qos_spec = utils.find_resource(volume_client.qos_specs, qos)
125123
volume_client.qos_specs.delete(qos_spec.id)
126-
return
127124

128125

129126
class DisassociateQos(command.Command):
@@ -166,8 +163,6 @@ def take_action(self, parsed_args):
166163
elif parsed_args.all:
167164
volume_client.qos_specs.disassociate_all(qos_spec.id)
168165

169-
return
170-
171166

172167
class ListQos(lister.Lister):
173168
"""List QoS specifications"""
@@ -230,8 +225,6 @@ def take_action(self, parsed_args):
230225
else:
231226
self.app.log.error("No changes requested\n")
232227

233-
return
234-
235228

236229
class ShowQos(show.ShowOne):
237230
"""Display QoS specification details"""
@@ -298,5 +291,3 @@ def take_action(self, parsed_args):
298291
parsed_args.property)
299292
else:
300293
self.app.log.error("No changes requested\n")
301-
302-
return

openstackclient/volume/v2/snapshot.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ def take_action(self, parsed_args):
9797
snapshot_id = utils.find_resource(
9898
volume_client.volume_snapshots, snapshot).id
9999
volume_client.volume_snapshots.delete(snapshot_id)
100-
return
101100

102101

103102
class ListSnapshot(lister.Lister):
@@ -217,7 +216,6 @@ def take_action(self, parsed_args):
217216
volume_client.volume_snapshots.set_metadata(snapshot.id,
218217
parsed_args.property)
219218
volume_client.volume_snapshots.update(snapshot.id, **kwargs)
220-
return
221219

222220

223221
class ShowSnapshot(show.ShowOne):
@@ -280,4 +278,3 @@ def take_action(self, parsed_args):
280278
)
281279
else:
282280
self.app.log.error("No changes requested\n")
283-
return

openstackclient/volume/v2/volume.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ def take_action(self, parsed_args):
189189
volume_client.volumes.force_delete(volume_obj.id)
190190
else:
191191
volume_client.volumes.delete(volume_obj.id)
192-
return
193192

194193

195194
class ListVolume(lister.Lister):
@@ -394,8 +393,6 @@ def take_action(self, parsed_args):
394393
if not kwargs and not parsed_args.property and not parsed_args.size:
395394
self.app.log.error("No changes requested\n")
396395

397-
return
398-
399396

400397
class ShowVolume(show.ShowOne):
401398
"""Display volume details"""
@@ -452,4 +449,3 @@ def take_action(self, parsed_args):
452449

453450
volume_client.volumes.delete_metadata(
454451
volume.id, parsed_args.property)
455-
return

0 commit comments

Comments
 (0)