jenkins-bot has submitted this change and it was merged.
Change subject: Fix normalization of template name in harvest_template ......................................................................
Fix normalization of template name in harvest_template
bug: 55122 Change-Id: Ie5969c5ac07c0a0f2b8a104f16513e24f0aa796a --- M scripts/harvest_template.py 1 file changed, 4 insertions(+), 1 deletion(-)
Approvals: Xqt: Looks good to me, but someone else must approve Merlijn van Deen: Looks good to me, approved Multichill: Looks good to me, but someone else must approve jenkins-bot: Verified
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py index 89b034a..9cf59a1 100755 --- a/scripts/harvest_template.py +++ b/scripts/harvest_template.py @@ -107,8 +107,11 @@ pagetext = page.get() templates = pywikibot.extract_templates_and_params(pagetext) for (template, fielddict) in templates: + # Clean up template + template = pywikibot.Page(page.site, template, + ns=10).title(withNamespace=False) # We found the template we were looking for - if template.replace(u'_', u' ') in self.templateTitles: + if template in self.templateTitles: for field, value in fielddict.items(): field = field.strip() value = value.strip()