Skip to content

Commit

Permalink
fix: change datafile accessor methods to return string instead of byt…
Browse files Browse the repository at this point in the history
…e array of the datafile
  • Loading branch information
pthompson127 committed Jul 9, 2020
1 parent 434252d commit f05771e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion optimizely/optimizely_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_datafile(self):
""" Get the datafile associated with OptimizelyConfig.
Returns:
A JSON representation of the environment's datafile.
A JSON string representation of the environment's datafile.
"""
return self._datafile

Expand Down
4 changes: 2 additions & 2 deletions optimizely/project_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, datafile, logger, error_handler):
"""

config = json.loads(datafile)
self._datafile = config
self._datafile = str(datafile)
self.logger = logger
self.error_handler = error_handler
self.version = config.get('version')
Expand Down Expand Up @@ -196,7 +196,7 @@ def to_datafile(self):
""" Get the datafile corresponding to ProjectConfig.
Returns:
A JSON representation of the project datafile.
A JSON string representation of the project datafile.
"""

return self._datafile
Expand Down

0 comments on commit f05771e

Please sign in to comment.