Theopolisme has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/100704


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/04/100704/1

diff --git a/scripts/featured.py b/scripts/featured.py
index f443eb5..a6c2555 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)")

-- 
To view, visit https://gerrit.wikimedia.org/r/100704
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8cac5745c652635d20eba81b3123e193d0370857
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Theopolisme <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to