jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Request: Handle present date in errors
......................................................................
[FIX] Request: Handle present date in errors
With 74b8e678 the 'code' and 'info' aren't removed from the error
dictionary. But when a server error occurs it still assumes this. This
patch is now removing the duplicate parameter and removing 'code' from
the dictionary as it's already handled via the class name.
Change-Id: Ib2e2f883b204d6fd941138113d449863173fce70
---
M pywikibot/data/api.py
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 41d6c82..98c8b73 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1676,7 +1676,8 @@
self.wait()
continue
- raise APIMWException(class_name, info, **result["error"])
+ del result['error']['code'] # is added via class_name
+ raise APIMWException(class_name, **result['error'])
# bugs 46535, 62126, 64494, 66619
# maybe removed when it 46535 is solved
--
To view, visit
https://gerrit.wikimedia.org/r/208028
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2e2f883b204d6fd941138113d449863173fce70
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
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 <>