Skip to content

Commit

Permalink
Merge pull request #224 from adhardydm/bugfix/unclosed-file-when-load…
Browse files Browse the repository at this point in the history
…ing-json-in-train-script

fix unclosed file
  • Loading branch information
nielstron committed Feb 27, 2023
2 parents 6343476 + e4c0e5c commit 3af1e1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quantulum3/scripts/train.py
Expand Up @@ -62,7 +62,8 @@ def main(args=None):
training_set = []
args.lang = None
for file in args.data:
training_set += json.load(open(file))
with open(file) as f:
training_set += json.load(f)
else:
training_set = None

Expand Down

0 comments on commit 3af1e1e

Please sign in to comment.