Revision: 7708 Author: alexsh Date: 2009-11-28 20:33:27 +0000 (Sat, 28 Nov 2009)
Log Message: ----------- get MainPage name by siteinfo
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2009-11-28 20:24:46 UTC (rev 7707) +++ trunk/pywikipedia/interwiki.py 2009-11-28 20:33:27 UTC (rev 7708) @@ -2160,7 +2160,11 @@ # ensure that we don't try to change main page try: site = pywikibot.getSite() - mainpagename = site.mediawiki_message('mainpage') + try: + mainpagename = site.siteinfo()['mainpage'] + except TypeError: #pywikibot module handle + mainpagename = site.siteinfo['mainpage'] + globalvar.skip.add(pywikibot.Page(site, mainpagename)) except pywikibot.Error: pywikibot.output(u'Missing main page name')
pywikipedia-svn@lists.wikimedia.org