mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
error handling
This commit is contained in:
parent
6214f65c0b
commit
3a0346b164
1 changed files with 8 additions and 2 deletions
|
@ -90,8 +90,14 @@ class Client(object):
|
||||||
|
|
||||||
for rule in self.chain.rules:
|
for rule in self.chain.rules:
|
||||||
src_ip = rule.src
|
src_ip = rule.src
|
||||||
_ip = str(ip_address.ip)
|
|
||||||
if src_ip.startswith(str(ip_address.ip)) and rule.protocol == protocol:
|
try:
|
||||||
|
_ip = str(ip_address.ip)
|
||||||
|
except:
|
||||||
|
# If we can't understand the argument just return None
|
||||||
|
return None
|
||||||
|
|
||||||
|
if src_ip.startswith(_ip) and rule.protocol == protocol:
|
||||||
return rule
|
return rule
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in a new issue