Allow zeros when detecting IPv4 address (e.g. 192.168.0.1)

This commit is contained in:
Vlastimil Holer 2014-01-28 19:09:46 +01:00
parent 2910ecb8e3
commit 76e73c9a2f

View File

@ -369,7 +369,7 @@ def is_ipv4(instr):
return False
try:
toks = [x for x in toks if (int(x) < 256 and int(x) > 0)]
toks = [x for x in toks if (int(x) < 256 and int(x) >= 0)]
except:
return False