web/__init__.py
branchstable
changeset 5389 809d3b5b3d31
parent 5377 84d14ddfae13
child 5421 8167de96c523
--- a/web/__init__.py	Fri Apr 23 14:55:10 2010 +0200
+++ b/web/__init__.py	Fri Apr 23 12:19:54 2010 +0200
@@ -10,10 +10,14 @@
 __docformat__ = "restructuredtext en"
 _ = unicode
 
-try:
-    from json import dumps
-except ImportError:
-    from simplejson import dumps
+import sys
+if sys.version_info < (2,6):
+    import simplejson as json
+else:
+    import json
+
+dumps = json.dumps
+
 from urllib import quote as urlquote
 
 from logilab.common.deprecation import deprecated