Skip to content

Commit

Permalink
Fixing encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
aliabbasrizvi committed Jun 4, 2019
1 parent 0250366 commit 7f7eddc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion optimizely/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def _handle_response(self, response):
return

self.set_last_modified(response.headers)
self.set_config(str.encode(response.text))
self.set_config(response.text)

def fetch_datafile(self):
""" Fetch datafile and set ProjectConfig. """
Expand All @@ -220,6 +220,7 @@ def fetch_datafile(self):
response = requests.get(self.datafile_url,
headers=request_headers,
timeout=enums.ConfigManager.REQUEST_TIMEOUT)
response.encoding = 'utf-8'
self._handle_response(response)

@property
Expand Down

0 comments on commit 7f7eddc

Please sign in to comment.