[Pywikipedia-svn] SVN: [7294] trunk/pywikipedia/wikipedia.py

alexsh at svn.wikimedia.org alexsh at svn.wikimedia.org
Thu Sep 24 12:37:35 UTC 2009


Revision: 7294
Author:   alexsh
Date:     2009-09-24 12:37:35 +0000 (Thu, 24 Sep 2009)

Log Message:
-----------
wikipedia.translate(): add return option if value under project is not dict (str or unicode)

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2009-09-24 06:35:36 UTC (rev 7293)
+++ trunk/pywikipedia/wikipedia.py	2009-09-24 12:37:35 UTC (rev 7294)
@@ -7209,6 +7209,9 @@
             xdict = xdict[default_family]
         else:
             xdict = xdict['wikipedia']
+        
+        if type(xdict) != dict:
+            return xdict
 
     if code in xdict:
         return xdict[code]





More information about the Pywikipedia-svn mailing list