http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11059
Revision: 11059 Author: xqt Date: 2013-02-09 15:24:52 +0000 (Sat, 09 Feb 2013) Log Message: ----------- some updates from trunk
Modified Paths: -------------- branches/rewrite/scripts/interwiki.py
Modified: branches/rewrite/scripts/interwiki.py =================================================================== --- branches/rewrite/scripts/interwiki.py 2013-02-09 15:24:04 UTC (rev 11058) +++ branches/rewrite/scripts/interwiki.py 2013-02-09 15:24:52 UTC (rev 11059) @@ -1315,7 +1315,8 @@ iw = page.langlinks() except pywikibot.NoSuchSite: if not globalvar.quiet: - pywikibot.output(u"NOTE: site %s does not exist" % page.site) + pywikibot.output(u"NOTE: site %s does not exist." + % page.site) continue
(skip, alternativePage) = self.disambigMismatch(page, counter) @@ -1988,10 +1989,12 @@ try: linkedPages = set(pywikibot.Page(l) for l in page.iterlanglinks()) except pywikibot.NoPage: - pywikibot.output(u"WARNING: Page %s does no longer exist?!" % page) + pywikibot.output( + u"WARNING: Page %s does no longer exist?!" % page) break - # To speed things up, create a dictionary which maps sites to pages. - # This assumes that there is only one interwiki link per language. + # To speed things up, create a dictionary which maps sites + # to pages. This assumes that there is only one interwiki + # link per language. linkedPagesDict = {} for linkedPage in linkedPages: linkedPagesDict[linkedPage.site] = linkedPage