jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/845867 )

Change subject: [bugfix] fix neutral additive element
......................................................................

[bugfix] fix neutral additive element

Previously it would raise

  TypeError: can only concatenate list (not "str") to list

Change-Id: Ie4873a7efeaef33375b5e8677d92c8cabafc043b
---
M scripts/blockpageschecker.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py
index 9eda9fc..36a6085 100755
--- a/scripts/blockpageschecker.py
+++ b/scripts/blockpageschecker.py
@@ -312,7 +312,7 @@
                         '"template_total_protection"'
                         .format(self.site.sitename))

-                replacement = '|'.join(ttp + tsp + (tu or ''))
+                replacement = '|'.join(ttp + tsp + (tu or []))
                 text, changes = re.subn(
                     f'<noinclude>({replacement})</noinclude>',
                     '', text)
@@ -383,7 +383,7 @@
                     pywikibot.info('The page is movable for all, deleting the '
                                    'template...')
                     # Deleting the template because the page doesn't need it.
-                    replacement = '|'.join(tsmp + ttmp + (tu or ''))
+                    replacement = '|'.join(tsmp + ttmp + (tu or []))
                     text, changes = re.subn(
                         f'<noinclude>({replacement})</noinclude>',
                         '', text)

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/845867
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ie4873a7efeaef33375b5e8677d92c8cabafc043b
Gerrit-Change-Number: 845867
Gerrit-PatchSet: 2
Gerrit-Owner: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to