diff options
Diffstat (limited to 'client/g2p.py')
| -rw-r--r-- | client/g2p.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/g2p.py b/client/g2p.py index 057757e..3225c73 100644 --- a/client/g2p.py +++ b/client/g2p.py @@ -43,9 +43,8 @@ def translateFile(input_filename, output_filename=None): if output_filename: out = '\n'.join(out) - f = open(output_filename, "wb") - f.write(out) - f.close() + with open(output_filename, "wb") as f: + f.write(out) return None |
