jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
Update login for py3

Bug: T257399
Change-Id: I968549f5347dd60465f3c0d88701b9adaf52a152
---
M scripts/login.py
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/scripts/login.py b/scripts/login.py
index 4f2087a..ac95b19 100755
--- a/scripts/login.py
+++ b/scripts/login.py
@@ -57,19 +57,17 @@
#
# Distributed under the terms of the MIT license.
#
-from __future__ import absolute_import, division, unicode_literals
-
from os.path import join
+from typing import Tuple

import pywikibot

from pywikibot import config
-
from pywikibot.exceptions import SiteDefinitionError
from pywikibot.login import OauthLoginManager


-def _get_consumer_token(site):
+def _get_consumer_token(site) -> Tuple[str, str]:
key_msg = 'OAuth consumer key on {0}:{1}'.format(site.code, site.family)
key = pywikibot.input(key_msg)
secret_msg = 'OAuth consumer secret for consumer {0}'.format(key)
@@ -77,7 +75,7 @@
return key, secret


-def _oauth_login(site):
+def _oauth_login(site) -> None:
consumer_key, consumer_secret = _get_consumer_token(site)
login_manager = OauthLoginManager(consumer_secret, site, consumer_key)
login_manager.login()
@@ -105,7 +103,7 @@
'oauth_token': oauth_token})


-def main(*args):
+def main(*args) -> None:
"""
Process command line arguments and invoke bot.


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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I968549f5347dd60465f3c0d88701b9adaf52a152
Gerrit-Change-Number: 611827
Gerrit-PatchSet: 1
Gerrit-Owner: JJMC89 <JJMC89.Wikimedia@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged