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)
pywikibot-commits@lists.wikimedia.org