diff --git a/gluon/contrib/shell.py b/gluon/contrib/shell.py index 341b32a2..638d3c81 100755 --- a/gluon/contrib/shell.py +++ b/gluon/contrib/shell.py @@ -48,7 +48,7 @@ _HISTORY_KIND = '_Shell_History' UNPICKLABLE_TYPES = [ types.ModuleType, type, - ClassType + ClassType, types.FunctionType, ] diff --git a/gluon/globals.py b/gluon/globals.py index 43079593..3af951c1 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -40,7 +40,7 @@ import threading import cgi import copy import tempfile -import json +import json as json_parser FMT = '%a, %d-%b-%Y %H:%M:%S PST' @@ -215,7 +215,7 @@ class Request(Storage): if is_json: try: - json_vars = json.load(body) + json_vars = json_parser.load(body) except: # incoherent request bodies can still be parsed "ad-hoc" json_vars = {}