Skip to content

Commit a23c08b

Browse files
committed
Add missing if idx < 0
1 parent 4eb5727 commit a23c08b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

aikido_zen/helpers/ip_matcher/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def has(self, network):
2727
if not net or not net.is_valid():
2828
return False
2929
idx = binary_search_for_insertion_index(net, self.sorted)
30+
if idx < 0:
31+
return False
3032
if idx < len(self.sorted) and self.sorted[idx].contains(net):
3133
return True
3234
if idx - 1 >= 0 and self.sorted[idx - 1].contains(net):

0 commit comments

Comments
 (0)