http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11345
Revision: 11345 Author: xqt Date: 2013-04-06 10:08:45 +0000 (Sat, 06 Apr 2013) Log Message: ----------- if xdict is a string, don't check for nested dictionaries
Modified Paths: -------------- trunk/pywikipedia/pywikibot/i18n.py
Modified: trunk/pywikipedia/pywikibot/i18n.py =================================================================== --- trunk/pywikipedia/pywikibot/i18n.py 2013-04-05 21:24:17 UTC (rev 11344) +++ trunk/pywikipedia/pywikibot/i18n.py 2013-04-06 10:08:45 UTC (rev 11345) @@ -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@lists.wikimedia.org