jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/636021 )

Change subject: [bugfix] HttpRequest.raw may be None and has no decode() method
......................................................................

[bugfix] HttpRequest.raw may be None and has no decode() method

Change-Id: I38dce9932047a5825578a568c107b6d3b976b7fd
---
M pywikibot/comms/threadedhttp.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Mpaa: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/comms/threadedhttp.py b/pywikibot/comms/threadedhttp.py
index 7148768..174ea1f 100644
--- a/pywikibot/comms/threadedhttp.py
+++ b/pywikibot/comms/threadedhttp.py
@@ -224,7 +224,8 @@
     @deprecated('the `text` property', since='20201011', future_warning=True)
     def decode(self, encoding, errors='strict') -> str:
         """Return the decoded response."""
-        return self.raw.decode(encoding, errors)
+        return self.raw.decode(encoding,
+                               errors) if not self.exception else None

     @property
     @deprecated('the `text` property', since='20180321', future_warning=True)

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/636021
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I38dce9932047a5825578a568c107b6d3b976b7fd
Gerrit-Change-Number: 636021
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Mpaa <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to