[FIX] correct translation tgz archive creation

lp bug: https://launchpad.net/bugs/415014 fixed

bzr revid: christophe@tinyerp.com-20090818171226-uu6v31pr0zrmne0k
This commit is contained in:
Christophe Simonis
2009-08-18 19:12:26 +02:00
parent eb15785f7b
commit a8c69e7885
+2 -1
View File
@@ -313,8 +313,9 @@ def trans_export(lang, modules, buffer, format, dbname=None):
tmpmoddir = join(tmpdir, mod, 'i18n')
os.makedirs(tmpmoddir)
pofilename = (newlang and mod or lang) + ".po" + (newlang and 't' or '')
buf = open(join(tmpmoddir, pofilename), 'w')
buf = file(join(tmpmoddir, pofilename), 'w')
_process('po', [mod], modrows, buf, lang, newlang)
buf.close()
tar = tarfile.open(fileobj=buffer, mode='w|gz')
tar.add(tmpdir, '')