summaryrefslogtreecommitdiff
path: root/sphinx/util/jsonimpl.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-07-27 20:44:32 +0200
committerGeorg Brandl <georg@python.org>2010-07-27 20:44:32 +0200
commita1fd9830e57944b980629ad3bf5b11771dc0af32 (patch)
tree7c6f299c644034242ee04145c295c79c39f7a60e /sphinx/util/jsonimpl.py
parent3d6dd4d1e7a56921943c191ed87316bd5aded7e9 (diff)
downloadsphinx-git-a1fd9830e57944b980629ad3bf5b11771dc0af32.tar.gz
Dont fail when no json impl is found.
Diffstat (limited to 'sphinx/util/jsonimpl.py')
-rw-r--r--sphinx/util/jsonimpl.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/sphinx/util/jsonimpl.py b/sphinx/util/jsonimpl.py
index 21f285d30..b83661a7e 100644
--- a/sphinx/util/jsonimpl.py
+++ b/sphinx/util/jsonimpl.py
@@ -39,5 +39,8 @@ def dumps(obj, *args, **kwds):
kwds['cls'] = SphinxJSONEncoder
return json.dumps(obj, *args, **kwds)
-load = json.load
-loads = json.loads
+def load(*args, **kwds):
+ return json.load(*args, **kwds)
+
+def loads(*args, **kwds):
+ return json.loads(*args, **kwds)