jenkins-bot has submitted this change and it was merged.
Change subject: (assertion fix) TypeError while raising APIError
......................................................................
(assertion fix) TypeError while raising APIError
APIError constructor includes two named keyword arguments and kwargs.
If json.loads returns something other than a dict, api.py tries
to raise an APIError exception passes a third unnamed argument to the
constructor, causing a TypeError exception to be raised.
Change-Id: Ieb7741d5737e6b0ad84b188b914f30411cdf0924
---
M pywikibot/data/api.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index a0f5aeb..d82e1a9 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -354,7 +354,7 @@
raise APIError("Unknown",
"Unable to process query response of type %s."
% type(result),
- {'data': result})
+ data=result)
if self['action'] == 'query':
if 'userinfo' in result.get('query', ()):
if hasattr(self.site, '_userinfo'):
--
To view, visit
https://gerrit.wikimedia.org/r/136306
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb7741d5737e6b0ad84b188b914f30411cdf0924
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>