replaced ipaddr with ipaddress.py (backported from py3)

This commit is contained in:
ilvalle
2016-12-03 08:42:35 +01:00
parent 0b8ecea4dc
commit 637579f531
5 changed files with 2434 additions and 1936 deletions
+2
View File
@@ -32,6 +32,7 @@ if PY2:
import cgi
import cookielib
from xmlrpclib import ProtocolError
from gluon.contrib import ipaddress
BytesIO = StringIO
reduce = reduce
hashlib_md5 = hashlib.md5
@@ -97,6 +98,7 @@ else:
from http import cookiejar as cookielib
from xmlrpc.client import ProtocolError
import html # warning, this is the python3 module and not the web2py html module
import ipaddress
hashlib_md5 = lambda s: hashlib.md5(bytes(s, 'utf8'))
iterkeys = lambda d: iter(d.keys())
itervalues = lambda d: iter(d.values())