fix assert
This commit is contained in:
parent
848d5791ed
commit
d24831a233
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ def read_ips(f):
|
|||
|
||||
def addr_to_int(ip):
|
||||
match = ipv4_pattern.fullmatch(ip)
|
||||
assert match is not None, row
|
||||
assert match is not None, ip
|
||||
segs = list(map(int, match.group(1, 2, 3, 4)))
|
||||
assert all(0 <= seg <= 255 for seg in segs), match.group(0)
|
||||
numeric = segs[0] << 24 | segs[1] << 16 | segs[2] << 8 | segs[3]
|
||||
|
|
Loading…
Reference in a new issue