jenkins-bot has submitted this change and it was merged.
Change subject: archivebot: use canonical title for calculating salt ......................................................................
archivebot: use canonical title for calculating salt
Change-Id: I0215d1f75755e65ad552c57f107e3a5252d7fab7 --- M scripts/archivebot.py 1 file changed, 7 insertions(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/archivebot.py b/scripts/archivebot.py index 0e8d54b..018c225 100644 --- a/scripts/archivebot.py +++ b/scripts/archivebot.py @@ -510,6 +510,8 @@ if not arg.startswith('-'): args.append(arg)
+ site = pywikibot.Site() + if calc: if not salt: pywikibot.showHelp() @@ -517,6 +519,11 @@ 'NOTE: you must specify a salt to calculate a key using ' '-salt:SALT option.') return + page = pywikibot.Page(site, calc) + if page.exists(): + calc = page.title() + else: + pywikibot.output(u'NOTE: the specified page "%s" does not (yet) exist.' % calc) s = md5() s.update(salt + '\n') s.update(calc + '\n') @@ -531,7 +538,6 @@ pywikibot.output(u'NOTE: you must specify a template to run the bot.') return
- site = pywikibot.Site() for a in args: pagelist = [] if not filename and not pagename:
pywikibot-commits@lists.wikimedia.org