Skip to content

Commit

Permalink
support for python2.5, use HTTP instead of HTTPS for the URL
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonySchneider-cnic committed Oct 18, 2016
1 parent 2756429 commit 88cedbf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion response.py
Expand Up @@ -13,7 +13,12 @@ def __init__(self, response):
self._response_hash = None
self._response_list_hash = None

if type(response) == bytes:
#try/except to support old versions of python, like python2.5
try:
if type(response) == bytes:
response = response.decode("utf-8")
self._response_string = response
except:
response = response.decode("utf-8")
self._response_string = response

Expand Down

0 comments on commit 88cedbf

Please sign in to comment.