All unittests pass in py2 and py3!

This commit is contained in:
Stuart D. Gathman committed 2016-09-29 00:27:42 -04:00
1 parent 626d5ae20e
commit a36dcbfcdd
3 files changed
+4 -4

No files matched your search

+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
+1 -1
View File
@@ -133,7 +133,7 @@ def parseaddr(t):
>>> parseaddr('God@heaven <@hop1.org,@hop2.net:[email protected]>')
('God@heaven', '[email protected]')
>>> parseaddr('Real Name ((comment)) <[email protected]>')
('Real Name', '[email protected]')
('Real Name (comment)', '[email protected]')
>>> parseaddr('a(WRONG)@b')
('WRONG', 'a@b')
"""