Skip to content

Commit

Permalink
Merge pull request #13 from Multiscale-Genomics/python3_compatible
Browse files Browse the repository at this point in the history
changing file() function to open() function
  • Loading branch information
athina1 committed Nov 27, 2018
2 parents 7bafd14 + 9e32127 commit e6e021b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/jsonapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _read_config(self, json_path): # pylint: disable=no-self-use
For more information see the schema for config.json.
"""
configuration = json.load(file(json_path))
configuration = json.load(open(json_path))
input_ids = {}
for input_config_id in configuration["input_files"]:
role = input_config_id["name"]
Expand Down Expand Up @@ -159,7 +159,7 @@ def _read_metadata(self, json_path): # pylint: disable=no-self-use
For more information see the schema for input_metadata.json.
"""
metadata = json.load(file(json_path))
metadata = json.load(open(json_path))
input_metadata = {}
for input_file in metadata:
input_id = input_file["_id"]
Expand Down Expand Up @@ -228,6 +228,6 @@ def _newresult(role, path, metadata):
results.append(
_newresult(role, path, metadata))
json.dump(
{"output_files": results}, file(json_path, 'w'),
{"output_files": results}, open(json_path, 'w'),
indent=4, separators=(',', ': '))
return True

0 comments on commit e6e021b

Please sign in to comment.