jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/487067 )
Change subject: [bugfix] Fix for loop in copyAndKeep()
......................................................................
[bugfix] Fix for loop in copyAndKeep()
As pointed out in
https://gerrit.wikimedia.org/r/#/c/pywikibot/core/+/487054/,
the for loop is broken here since
https://phabricator.wikimedia.org/rPWBO53135d55c341278bb6844183701bc78afe12…
in compat was merged. In compat this bug was fixed in 2008, but I suspect
the copyAndKeep method isn't used in core anymore as this bug never showed up.
Change-Id: I589c17af428c48f5ab0e69c5ecc468441a0ef1cc
---
M pywikibot/page.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Zhuyifei1999: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 9b6eb22..1718e08 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -3045,9 +3045,9 @@
authors = ', '.join(self.contributingUsers())
creation_summary = message % (self.title(), authors)
newtext = self.get()
- for regex_name in cfd_templates:
- matchcfd = re.compile(r'{{%s.*?}}' % regex_name, re.IGNORECASE)
- newtext = matchcfd.sub('', newtext)
+ for regex_name in cfd_templates:
+ matchcfd = re.compile(r'{{%s.*?}}' % regex_name, re.IGNORECASE)
+ newtext = matchcfd.sub('', newtext)
matchcomment = re.compile(
r'<!--BEGIN CFD TEMPLATE-->.*?<!--END CFD
TEMPLATE-->',
re.IGNORECASE | re.MULTILINE | re.DOTALL)
--
To view, visit
https://gerrit.wikimedia.org/r/487067
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I589c17af428c48f5ab0e69c5ecc468441a0ef1cc
Gerrit-Change-Number: 487067
Gerrit-PatchSet: 4
Gerrit-Owner: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: D3r1ck01 <alangiderick(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Framawiki <framawiki(a)tools.wmflabs.org>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)