All unittests pass in py2 and py3!

This commit is contained in:
Stuart D. Gathman
2016-09-29 00:27:42 -04:00
parent 626d5ae20e
commit a36dcbfcdd
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -54,11 +54,11 @@ def is_dynip(host,addr):
if host.find(addr) >= 0: return True
if addr.find(':') >= 0: return False # IP6
a = addr.split('.')
ia = map(int,a)
ia = list(map(int,a))
h = host
m = ip3.findall(host)
if m:
g = map(int,m)[:4]
g = list(map(int,m))[:4]
ia3 = (ia[1:],ia[:3])
if g[-3:] in ia3: return True
if g[0] == ia[3] and g[1:3] == ia[:2]: return True