jenkins-bot has submitted this change and it was merged.
Change subject: Remove no longer applicable templates when adding new ones ......................................................................
Remove no longer applicable templates when adding new ones
When adding {{Link FA}}, remove {{Link GA}}. When adding {{Link FA}}, remove {{Link GA}}. The code was already there, it just looks like someone made a typo that caused this not to run.
Bug: 55037 Change-Id: I8cac5745c652635d20eba81b3123e193d0370857 --- M scripts/featured.py 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/featured.py b/scripts/featured.py index f443eb5..e29db0a 100644 --- a/scripts/featured.py +++ b/scripts/featured.py @@ -586,11 +586,12 @@ changed = True if remove_tl: if m2: - if (not interactive or + if (changed or # Don't force the user to say "Y" twice + not interactive or pywikibot.input( u'Connecting %s -> %s. Proceed? [Y/N]' % (a.title(), atrans.title())) in ['Y', 'y']): - text = re.sub(re_Link_add, '', text) + text = re.sub(re_Link_remove, '', text) changed = True elif task == 'former': pywikibot.output(u"(already removed)")
pywikibot-commits@lists.wikimedia.org