jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/701695 )
Change subject: [bugfix] movepages requires pre-cached credentials ......................................................................
[bugfix] movepages requires pre-cached credentials
Unlike add_text.py which logs you in if credentials are not cached, movepages.py errored.
Bug: T285723 Change-Id: Ia1fe699b16a934d9da6d8e830f5feff947015813 --- M scripts/movepages.py 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/movepages.py b/scripts/movepages.py index 3095006..237888b 100755 --- a/scripts/movepages.py +++ b/scripts/movepages.py @@ -237,7 +237,12 @@
if oldName: pywikibot.warning('-from:{} without -to:'.format(oldName)) + site = pywikibot.Site() + + if not site.logged_in(): + site.login() + for pair in fromToPairs: page = pywikibot.Page(site, pair[0]) bot = MovePagesBot(**options)
pywikibot-commits@lists.wikimedia.org