http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11346

Revision: 11346
Author:   xqt
Date:     2013-04-06 10:10:28 +0000 (Sat, 06 Apr 2013)
Log Message:
-----------
if xdict is a string, don't check for nested dictionaries, update from trunk 
r11345

Modified Paths:
--------------
    branches/rewrite/pywikibot/i18n.py

Modified: branches/rewrite/pywikibot/i18n.py
===================================================================
--- branches/rewrite/pywikibot/i18n.py  2013-04-06 10:08:45 UTC (rev 11345)
+++ branches/rewrite/pywikibot/i18n.py  2013-04-06 10:10:28 UTC (rev 11346)
@@ -262,10 +262,11 @@
         code = code.lang
 
     # Check whether xdict has multiple projects
-    if family in xdict:
-        xdict = xdict[family]
-    elif 'wikipedia' in xdict:
-        xdict = xdict['wikipedia']
+    if type(xdict) == dict:
+        if family in xdict:
+            xdict = xdict[family]
+        elif 'wikipedia' in xdict:
+            xdict = xdict['wikipedia']
 
     # Get the translated string
     trans = None


_______________________________________________
Pywikipedia-svn mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn

Reply via email to