fix py3 xmlrpc imports, close #1473

This commit is contained in:
ilvalle
2016-09-25 10:43:42 +02:00
parent b4acfd0724
commit 4468355d01
3 changed files with 11 additions and 6 deletions
+2
View File
@@ -31,6 +31,7 @@ if PY2:
from types import ClassType
import cgi
import cookielib
from xmlrpclib import ProtocolError
BytesIO = StringIO
reduce = reduce
hashlib_md5 = hashlib.md5
@@ -94,6 +95,7 @@ else:
from urllib.request import FancyURLopener, urlopen
from urllib.parse import quote as urllib_quote, unquote as urllib_unquote, urlencode
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
hashlib_md5 = lambda s: hashlib.md5(bytes(s, 'utf8'))
iterkeys = lambda d: iter(d.keys())