[Pywikipedia-svn] SVN: [7286] trunk/pywikipedia/query.py

nicdumz at svn.wikimedia.org nicdumz at svn.wikimedia.org
Tue Sep 22 07:12:13 UTC 2009


Revision: 7286
Author:   nicdumz
Date:     2009-09-22 07:12:13 +0000 (Tue, 22 Sep 2009)

Log Message:
-----------
Avoid naming conflicts for json module

Modified Paths:
--------------
    trunk/pywikipedia/query.py

Modified: trunk/pywikipedia/query.py
===================================================================
--- trunk/pywikipedia/query.py	2009-09-21 17:29:21 UTC (rev 7285)
+++ trunk/pywikipedia/query.py	2009-09-22 07:12:13 UTC (rev 7286)
@@ -29,6 +29,10 @@
 try:
     #For Python 2.6 newer
     import json
+    if not hasattr(json, 'loads'):
+        # 'json' can also be the name in for 
+        # http://pypi.python.org/pypi/python-json
+        import simplejson as json
 except ImportError:
     import simplejson as json
     





More information about the Pywikipedia-svn mailing list