jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/618043 )
Change subject: [bugfix] Only mention archives where something was really
archived
......................................................................
[bugfix] Only mention archives where something was really archived
Avoid mentioning archives which were loaded but nothing was archived
there (e.g., for being full).
Change-Id: Iac870d0e80f3ee3d5f4e9b1c47f10e7048b45a07
---
M scripts/archivebot.py
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 292f35d..0e85bfc 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -787,9 +787,10 @@
self.page.header = rx.sub(self.attr2text(), self.page.header)
self.comment_params['count'] = self.archived_threads
comma = self.site.mediawiki_message('comma-separator')
- self.comment_params['archives'] \
- = comma.join(a.title(as_link=True)
- for a in self.archives.values())
+ self.comment_params['archives'] = comma.join(
+ a.title(as_link=True) for a in self.archives.values()
+ if a.archived_threads > 0
+ )
# Find out the reasons and return them localized
translated_whys = set()
for why, arg in whys:
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/618043
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: Iac870d0e80f3ee3d5f4e9b1c47f10e7048b45a07
Gerrit-Change-Number: 618043
Gerrit-PatchSet: 3
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]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits