Skip to content

Commit

Permalink
Add two breaks for a small speedup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Peck committed Dec 8, 2014
1 parent 72a738d commit 347cdc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ipgroup.py
Expand Up @@ -162,6 +162,7 @@ def _overlapping_bits(self, ips):
for a, b in combinations(master_networks, 2):
if a.overlaps(b):
overlapping_bit = True
break

if overlapping_bit:
return self._overlapping_bits(master_networks)
Expand All @@ -181,6 +182,7 @@ def totalAddresses(self, ip_objs):
for a, b in combinations(ips, 2):
if a.overlaps(b):
overlapping_bit = True
break

if overlapping_bit:
ips = self._overlapping_bits(ips)
Expand Down

0 comments on commit 347cdc4

Please sign in to comment.