changeset 16cb8ba98c31 in tryton-tools:default
details: https://hg.tryton.org/tryton-tools?cmd=changeset;node=16cb8ba98c31
description:
Write po file as binary
diffstat:
localize_modules.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r 05bb3a40700a -r 16cb8ba98c31 localize_modules.py
--- a/localize_modules.py Mon May 06 14:34:45 2019 +0200
+++ b/localize_modules.py Mon May 06 14:36:27 2019 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import os
from optparse import OptionParser
@@ -35,8 +35,9 @@
if not os.path.exists(locale_dir):
os.mkdir(locale_dir)
po_path = os.path.join(locale_dir, '%s.po' % language.code)
- with open(po_path, 'w') as csv_file:
- csv_file.write(export_wizard.form.file)
+ with open(po_path, 'wb') as po_file:
+ po_file.write(export_wizard.form.file)
+
if __name__ == '__main__':
parser = OptionParser("%prog [options] module_path")