jenkins-bot merged this change.

View Change

Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified
[bugfix] Fix parameter order different between Python 2 and 3

- also remove key from the default attributes list as it is an empty
value by default
- fix default template style to what archivebot saves after archivation

Bug: T213804
Change-Id: Ia034fa34c630097aab25600f2f9efb11be179256
---
M scripts/archivebot.py
1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 8028f5f..66ac3aa 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -18,14 +18,14 @@
Trancluded template may contain the following parameters:

{{TEMPLATE_PAGE
- |archive =
- |algo =
- |counter =
- |maxarchivesize =
- |minthreadsleft =
+ |archive =
+ |algo =
+ |counter =
+ |maxarchivesize =
+ |minthreadsleft =
|minthreadstoarchive =
- |archiveheader =
- |key =
+ |archiveheader =
+ |key =
}}

Meanings of parameters are:
@@ -91,7 +91,7 @@
#
# (C) Misza13, 2006-2010
# (C) xqt, 2009-2018
-# (C) Pywikibot team, 2007-2018
+# (C) Pywikibot team, 2007-2019
#
# Distributed under the terms of the MIT license.
#
@@ -104,6 +104,7 @@
import re
import time

+from collections import OrderedDict
from hashlib import md5
from math import ceil

@@ -515,13 +516,12 @@
param force: override security value
type force: bool
"""
- self.attributes = {
- 'algo': ['old(24h)', False],
- 'archive': ['', False],
- 'maxarchivesize': ['1000M', False],
- 'counter': ['1', False],
- 'key': ['', False],
- }
+ self.attributes = OrderedDict([
+ ('archive', ['', False]),
+ ('algo', ['old(24h)', False]),
+ ('counter', ['1', False]),
+ ('maxarchivesize', ['1000M', False]),
+ ])
self.salt = salt
self.force = force
self.site = page.site

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia034fa34c630097aab25600f2f9efb11be179256
Gerrit-Change-Number: 484406
Gerrit-PatchSet: 6
Gerrit-Owner: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: D3r1ck <alangiderick@gmail.com>
Gerrit-Reviewer: D3r1ck01 <alangiderick@gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki@gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: Framawiki <framawiki@tools.wmflabs.org>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999@gmail.com>
Gerrit-Reviewer: jenkins-bot (75)