don't overwrite a response's encoding with None

This commit is contained in:
Mike Fährmann 2016-10-30 20:38:22 +01:00
parent e0b3339107
commit e6d26f0476
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -30,11 +30,11 @@ class Extractor():
def items(self):
yield Message.Version, 1
return
def request(self, url, encoding=None, *args, **kwargs):
response = safe_request(self.session, url, *args, **kwargs)
response.encoding = encoding
if encoding:
response.encoding = encoding
return response