jenkins-bot has submitted this change and it was merged. Change subject: Enabling the error handling in decode method. ......................................................................
Enabling the error handling in decode method. Enabled python implementation of error handling for the decode method of HttpRequest. It accepts the "errors" argument which can take the values like 'strict', 'replace' and 'ignore' according to need. 'strict' is the default value. Bug: T88928 Change-Id: I02609a5abcdf0e5e66bbb4ffdcc41aaf74d5c943 --- M pywikibot/comms/threadedhttp.py 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: John Vandenberg: Looks good to me, approved XZise: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/pywikibot/comms/threadedhttp.py b/pywikibot/comms/threadedhttp.py index b7a7422..a2f6ef3 100644 --- a/pywikibot/comms/threadedhttp.py +++ b/pywikibot/comms/threadedhttp.py @@ -477,9 +477,9 @@ raise self._encoding return self._encoding - def decode(self, encoding): + def decode(self, encoding, errors='strict'): """Return the decoded response.""" - return self.raw.decode(self.encoding) + return self.raw.decode(encoding, errors) @property def content(self): -- To view, visit https://gerrit.wikimedia.org/r/189975 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02609a5abcdf0e5e66bbb4ffdcc41aaf74d5c943 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Maverick <manpreetkaur9...@gmail.com> Gerrit-Reviewer: John Vandenberg <jay...@gmail.com> Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com> Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl> Gerrit-Reviewer: XZise <commodorefabia...@gmx.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ Pywikibot-commits mailing list Pywikibot-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits