fix serializers, websocket_messaging

This commit is contained in:
ilvalle committed 2016-06-13 20:20:49 +02:00
1 parent ab2cdd595b
commit a27f6f88ef
5 files changed
+35 -15

No files matched your search

+2 -2
View File
@@ -8,7 +8,7 @@
Support for smart import syntax for web2py applications
-------------------------------------------------------
"""
from gluon._compat import builtin
from gluon._compat import builtin, unicodeT, PY2
import os
import sys
import threading
@@ -47,7 +47,7 @@ def custom_importer(name, globals=None, locals=None, fromlist=None, level=-1):
If the import fails, it falls back on naive_importer
"""
if isinstance(name, unicode):
if isinstance(name, unicodeT) and PY2:
name = name.encode('utf8')
globals = globals or {}