jenkins-bot has submitted this change and it was merged.
Change subject: Minor improvment to regex pattern of archivebot ......................................................................
Minor improvment to regex pattern of archivebot
Change-Id: Iff437c0748e07139e44c0bd5276265c3f303e99d --- M scripts/archivebot.py 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/archivebot.py b/scripts/archivebot.py index dc13f7d..6c9a9d3 100644 --- a/scripts/archivebot.py +++ b/scripts/archivebot.py @@ -535,8 +535,9 @@ self.archives[a].update(comment)
# Save the page itself - rx = re.compile(r"{{(?:%s)?:?%s\n.*?\n}}" % (u'|'.join( - set(self.site.namespaces[self.tpl.namespace()])), + marker = '?' if self.tpl.namespace() == 10 else '' + rx = re.compile(r"{{(?:(?:%s):)%s%s\s*?\n.*?\n}}" % (u'|'.join( + set(self.site.namespaces[self.tpl.namespace()])), marker, re.escape(self.tpl.title(withNamespace=False))), re.DOTALL) if not rx.search(self.page.header): pywikibot.error("Couldn't find the template in the header")