Revision: 4119 Author: valhallasw Date: 2007-08-26 21:49:19 +0000 (Sun, 26 Aug 2007)
Log Message: ----------- Not removing link when both commented and non-commented (i.e. <!-- [[nl:blaat]] --> [[nl:blaat]]); now using .aslink() instead of str()
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2007-08-26 21:36:18 UTC (rev 4118) +++ trunk/pywikipedia/interwiki.py 2007-08-26 21:49:19 UTC (rev 4119) @@ -960,8 +960,11 @@
try: if (new[ignorepage.site()] == ignorepage) and (ignorepage.site() != page.site()): - wikipedia.output(u"Ignoring link to %(to)s for %(from)s" % {'to': ignorepage, 'from': page}) - new.pop(ignorepage.site()) + if (ignorepage not in page.interwiki()): + wikipedia.output(u"Ignoring link to %(to)s for %(from)s" % {'to': ignorepage.aslink(), 'from': page.aslink()}) + new.pop(ignorepage.site()) + else: + wikipedia.output(u"NOTE: Not removing interwiki from %(from)s to %(to)s (exists both commented and non-commented)" % {'to': ignorepage.aslink(), 'from': page.aslink()}) except KeyError: pass
pywikipedia-l@lists.wikimedia.org