Skip to content

Commit

Permalink
chore: rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
yanksyoon committed Jan 26, 2024
1 parent 4405ec5 commit ea26b9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@ def _exclude_network(
Returns:
The network pool without the network segments in excludes.
"""
total_excluded_networks = set(networks)
total_networks_without_excluded = set(networks)

for exclude in excludes:
scoped_excluded_networks: set[NetworkT] = set()
for net in total_excluded_networks:
for net in total_networks_without_excluded:
if net.overlaps(exclude):
scoped_excluded_networks.update(net.address_exclude(exclude))
else:
scoped_excluded_networks.add(net)
total_excluded_networks = scoped_excluded_networks
total_networks_without_excluded = scoped_excluded_networks

return total_excluded_networks
return total_networks_without_excluded

def refresh_firewall(
self,
Expand Down

0 comments on commit ea26b9b

Please sign in to comment.