jenkins-bot has submitted this change and it was merged.
Change subject: Use mainpage from siteinfo ......................................................................
Use mainpage from siteinfo
Porting a fix from compat to core. https://mediawiki.org/wiki/Special:Code/pywikipedia/7708
Bug: T103079 Change-Id: Ifd2e3e18860aabe9ecfbd58e3a2a6b33180e1f01 --- M scripts/interwiki.py 1 file changed, 2 insertions(+), 5 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/interwiki.py b/scripts/interwiki.py index 5f5ffb2..fa26860 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -2539,11 +2539,8 @@
site = pywikibot.Site() # ensure that we don't try to change main page - try: - mainpagename = site.mediawiki_message('mainpage') - globalvar.skip.add(pywikibot.Page(site, mainpagename)) - except pywikibot.Error: - pywikibot.output(u'Missing main page name') + mainpagename = site.siteinfo['mainpage'] + globalvar.skip.add(pywikibot.Page(site, mainpagename))
if newPages is not None: if len(namespaces) == 0:
pywikibot-commits@lists.wikimedia.org