Skip to content
Myr

keep json None fo row

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 8b141b3 · Browse files · 1 file+8 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−4 removed

  • other:+8 added−4 removed

1 file+8 added−4 removed

modified:requests/models.py+8 added-4 removed
1046 unmodified lines
1047 # decoding fails, fall back to `self.text` (using chardet to make1048 # a best guess).1049 encoding = guess_json_utf(self.content)1050 if encoding is not None:1051 try:1051 return json.loads(self.content.decode(encoding))1052 return json.loads(self.content.decode(encoding))1053 except (ValueError, UnicodeDecodeError):1054 pass1055 try:1056 return json.loads(self.text or self.content)1057 except ValueError:1058 return None10591053 return json.loads(self.text or self.content)105410551060 @property1061 def links(self):1062 """Returns the parsed header links of the response, if any."""1063
29 unmodified lines