chg: make mypy happy

pull/16/head
Raphaël Vinot 2022-03-17 12:42:16 +01:00
parent 85831c146a
commit 64918ed2f5
1 changed files with 2 additions and 2 deletions

View File

@ -101,11 +101,11 @@ class WarningList():
return any(value == v or value.endswith("." + v.lstrip(".")) for v in self.list) return any(value == v or value.endswith("." + v.lstrip(".")) for v in self.list)
elif self.type == 'cidr': elif self.type == 'cidr':
try: try:
value = ip_address(value) ip_value = ip_address(value)
except ValueError: except ValueError:
# The value to search isn't an IP address, falling back to default # The value to search isn't an IP address, falling back to default
return self._fast_search(value) return self._fast_search(value)
return any((value == obj or value in obj) for obj in self._network_objects) return any((ip_value == obj or ip_value in obj) for obj in self._network_objects)
return False return False