jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[bugfix] Fix Python 2 bug in action=clientlogin

Change-Id: I2894680f25ec403800a1c48d9a5e61e5dcd57284
---
M pywikibot/data/api.py
1 file changed, 2 insertions(+), 1 deletion(-)

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 change 584090. To unsubscribe, or for help writing mail filters, visit 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@seznam.cz>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)