jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/584090 )
Change subject: [bugfix] Fix Python 2 bug in action=clientlogin
......................................................................
[bugfix] Fix Python 2 bug in action=clientlogin
Change-Id: I2894680f25ec403800a1c48d9a5e61e5dcd57284
---
M pywikibot/data/api.py
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 9d54333..207b3ab 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -3167,7 +3167,8 @@
or status == 'Failed' and 'wait' in fail_reason):
match = re.search(r'(\d+) (seconds|minutes)', fail_reason)
if match:
- delta = datetime.timedelta(**{match[2]: int(match[1])})
+ delta = datetime.timedelta(
+ **{match.group(2): int(match.group(1))})
wait = response.get('wait')
if wait:
delta = datetime.timedelta(seconds=int(wait))
--
To view, visit
https://gerrit.wikimedia.org/r/584090
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2894680f25ec403800a1c48d9a5e61e5dcd57284
Gerrit-Change-Number: 584090
Gerrit-PatchSet: 3
Gerrit-Owner: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)