Skip to content

Commit

Permalink
Fix no-else-continue / no-else-return
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobranco777 committed Aug 31, 2023
1 parent 6b39d20 commit d3097af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions ocw/lib/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ def delete_vpc_subnets(self, vpc) -> None:
if exc.response['Error']['Code'] == 'InvalidParameterValue':
self.log_info(exc.response['Error'])
continue
else:
raise
raise
if self.dry_run:
self.log_info(f'Deletion of {subnet} skipped due to dry_run mode')
else:
Expand Down
3 changes: 1 addition & 2 deletions ocw/lib/gce.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ def list_zones(self, region) -> list:
if GCE.get_error_reason(exc) == 'notFound':
self.log_dbg("list_zones: region {} not found", region)
return []
else:
raise exc
raise exc

def delete_instance(self, instance_id, zone) -> None:
self._delete_resource(
Expand Down

0 comments on commit d3097af

Please sign in to comment.