Revision: 7766 Author: xqt Date: 2009-12-12 02:01:06 +0000 (Sat, 12 Dec 2009)
Log Message: ----------- Different messages for templates and other namespaces; bugfix for list object (ca-wiki)
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2009-12-12 01:31:56 UTC (rev 7765) +++ trunk/pywikipedia/interwiki.py 2009-12-12 02:01:06 UTC (rev 7766) @@ -1702,9 +1702,13 @@ pywikibot.output(u"Changes to be made: %s" % mods) oldtext = page.get() template = (page.namespace() == 10) - newtext = pywikibot.replaceLanguageLinks(oldtext, new, site = page.site(), template = template ) - if template and not botMayEdit(page): - pywikibot.output(u'SKIPPING: %s should have interwiki links on subpage.' % page.aslink(True)) + newtext = pywikibot.replaceLanguageLinks(oldtext, new, site = page.site(), template = template) + # This is for now. Later there should be different funktions for each kind + if not botMayEdit(page): + if template: + pywikibot.output(u'SKIPPING: %s should have interwiki links on subpage.' % page.aslink(True)) + else: + pywikibot.output(u'SKIPPING: %s is under construction or to be deleted.' % page.aslink(True)) return False if newtext == oldtext: return False @@ -2105,7 +2109,7 @@ except KeyError: pass if type(tmpl) != list: - tmpl = tmpl.split() + tmpl = [tmpl] try: tmpl += ignoreTemplates[page.site().lang] except KeyError:
pywikipedia-svn@lists.wikimedia.org