remove simplejson

This commit is contained in:
Leonel Câmara committed 2016-05-11 00:47:23 +01:00
1 parent 713fe8e2bc
commit a9ee9a6b58
34 files changed
+56 -1785

No files matched your search

+1 -11
View File
@@ -24,6 +24,7 @@ import optparse
import tempfile
import types
import Queue
from json import loads, dumps
from gluon import DAL, Field, IS_NOT_EMPTY, IS_IN_SET, IS_NOT_IN_DB
from gluon import IS_INT_IN_RANGE, IS_DATETIME, IS_IN_DB
from gluon.utils import web2py_uuid
@@ -92,17 +93,6 @@ path = os.getcwd()
if 'WEB2PY_PATH' not in os.environ:
os.environ['WEB2PY_PATH'] = path
try:
# try external module
from simplejson import loads, dumps
except ImportError:
try:
# try stdlib (Python >= 2.6)
from json import loads, dumps
except:
# fallback to pure-Python module
from gluon.contrib.simplejson import loads, dumps
IDENTIFIER = "%s#%s" % (socket.gethostname(), os.getpid())
logger = logging.getLogger('web2py.scheduler.%s' % IDENTIFIER)