jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[bugfix] Fix TypeError in archivebot.py

- Unfortunately frozenset and FrozenDict are not hashable (bug)?
- Using tuple instead

Bug: T224117
Change-Id: I6fb7928ca00e9091d333050992826c2f296ca6a6
---
M scripts/archivebot.py
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 59eeda8..5ea63ac 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -380,8 +380,8 @@
"""
Check whether thread has to be archived.

- @return: the archivation reason as a dict of localization args
- @rtype: dict
+ @return: the archivation reason as a tuple of localization args
+ @rtype: tuple
"""
# Archived by timestamp
algo = archiver.get_attr('algo')
@@ -393,7 +393,7 @@
maxage = str2time(re_t.group(1), self.timestamp)
if self.now - self.timestamp > maxage:
duration = str2localized_duration(archiver.site, re_t.group(1))
- return {'duration': duration}
+ return ('duration', duration)
# TODO: handle marked with template
return None

@@ -693,7 +693,7 @@
for a in self.archives.values())
# Find out the reasons and return them localized
translated_whys = set()
- for why, arg in whys.items():
+ for why, arg in whys:
# Archived by timestamp
if why == 'duration':
translated_whys.add(

To view, visit change 511874. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6fb7928ca00e9091d333050992826c2f296ca6a6
Gerrit-Change-Number: 511874
Gerrit-PatchSet: 4
Gerrit-Owner: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)