Skip to content

Commit

Permalink
Remove optional parameter because sometimes we do not have it
Browse files Browse the repository at this point in the history
  • Loading branch information
asmorodskyi committed Jan 4, 2024
1 parent 6431fae commit 7fcfaae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions ocw/lib/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,7 @@ def delete_routing_tables(self, region: str, vpc_id: str) -> None:
else:
self.log_info(f"Delete route {route_table['RouteTableId']}")
self.log_dbg(route)
self.ec2_client(region).delete_route(RouteTableId=route_table['RouteTableId'],
DestinationCidrBlock=route['DestinationCidrBlock'])
self.ec2_client(region).delete_route(RouteTableId=route_table['RouteTableId'])
if route_table['Associations'] == []:
if self.dry_run:
self.log_info(f"{route_table['RouteTableId']} routing table will not be deleted due to dry_run mode")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def disassociate_route_table(self, AssociationId):
def describe_route_tables(self, Filters):
return MockedEC2Client.routing_tables

def delete_route(self, RouteTableId, DestinationCidrBlock):
def delete_route(self, RouteTableId):
if RouteTableId == '2':
MockedEC2Client.delete_route_called = True

Expand Down

0 comments on commit 7fcfaae

Please sign in to comment.