Skip to content

Commit

Permalink
Merge pull request #1385 from maurosoria/shelld3v-patch-8
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
maurosoria authored Aug 18, 2024
2 parents 636e1a8 + 71cae12 commit 3f22902
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/connection/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ def __init__(self, response):
break

if not is_binary(self.body):
self.content = self.body.decode(
response.encoding or DEFAULT_ENCODING, errors="ignore"
)
try:
self.content = self.body.decode(
response.encoding or DEFAULT_ENCODING, errors="ignore"
)
except LookupError:
self.content = self.body.decode(
DEFAULT_ENCODING, errors="ignore"
)

@property
def type(self):
Expand Down

0 comments on commit 3f22902

Please sign in to comment.