diff options
| author | xmo-odoo <xmo@odoo.com> | 2018-02-02 19:39:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-02 19:39:51 +0100 |
| commit | 43617bbcb65fc4048ad97567067cb2f3138873a3 (patch) | |
| tree | cad809effd5a19a6d9e0dd05c5c22d6a014c9ac8 /addons/base_setup | |
| parent | 63c39c74605a9458de4e7a8a2a2f3821e55843ba (diff) | |
[FIX] type error when exporting to tarfiles
When exporting to a tarfile, we first export each module's translations
to a file on the FS, then create a tarball from all of them.
With the P3 bytes/string split, translation export was defined to export
to a bytes IO object in order to work correctly with CSV (which work on
bytes IO for better cross-version compatibility). However the tgz file
export was left opening module's files in `w` mode, which in P3 means
text, which blows up as POFile expects to ultimately write to a bytes IO
object: it uses text, and a StreamReaderWriter is used to translate that
into an underlying bytes IO.
Fix by explicitly opening the files in binary mode.
Fixes #22700
Diffstat (limited to 'addons/base_setup')
0 files changed, 0 insertions, 0 deletions
