http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10651
Revision: 10651 Author: xqt Date: 2012-11-03 12:54:49 +0000 (Sat, 03 Nov 2012) Log Message: ----------- Page.templatesWithParams() returns a Page object, not a string; remove deprecated arg get_redirect
Modified Paths: -------------- branches/rewrite/scripts/interwiki.py
Modified: branches/rewrite/scripts/interwiki.py =================================================================== --- branches/rewrite/scripts/interwiki.py 2012-11-03 12:42:02 UTC (rev 10650) +++ branches/rewrite/scripts/interwiki.py 2012-11-03 12:54:49 UTC (rev 10651) @@ -2330,9 +2330,9 @@ pass tmpl += ignoreTemplates['_default'] if tmpl != []: - templates = page.templatesWithParams(get_redirect=True); + templates = page.templatesWithParams(); for template in templates: - if template[0].lower() in tmpl: + if template[0].title(withNamespace=False).lower() in tmpl: return False return True
pywikipedia-svn@lists.wikimedia.org