diff options
author | Álvaro Muñoz <alvaro.munoz@gmail.com> | 2018-08-18 17:35:13 -0300 |
---|---|---|
committer | Álvaro Muñoz <alvaro.munoz@gmail.com> | 2018-08-18 17:35:13 -0300 |
commit | 83981112037eb326ba29c00281e5f187a37a26e0 (patch) | |
tree | 805889a3e20dde2b3c002ed11d99eb0c85751862 | |
parent | 45a43928cee0015b0361b021c914ef75ffe58e96 (diff) | |
download | itstool-83981112037eb326ba29c00281e5f187a37a26e0.tar.gz |
Fix #28 (python 3.7, macOS)
-rwxr-xr-x | itstool.in | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1560,6 +1560,7 @@ if __name__ == '__main__': doc.output_test_data(opts.test, out) else: messages.output(out) + out.flush() elif opts.merge is not None: try: translations = gettext.GNUTranslations(open(opts.merge, 'rb')) @@ -1605,6 +1606,7 @@ if __name__ == '__main__': if fout_is_str: fout = open(os.path.join(fout, os.path.basename(filename)), 'wb') fout.write(serialized) + fout.flush() if fout_is_str: fout.close() elif opts.join is not None: @@ -1644,3 +1646,4 @@ if __name__ == '__main__': if isinstance(fout, string_types): fout = open(os.path.join(fout, os.path.basename(filename)), 'w') fout.write(doc._doc.serialize('utf-8')) + fout.flush() |