Update response.py

Type check by isinstance
This commit is contained in:
cr0hn 2016-12-24 15:24:25 +01:00 committed by GitHub
parent f091d82bad
commit cc982c5a61

View File

@ -80,7 +80,7 @@ class HTTPResponse:
if body is not None:
self.body = body
if type(body) is str:
if isinstance(body, str):
self.body = body.encode('utf-8')
else:
self.body = body_bytes