From b6c69c83a22483659703f95b61c4ba4e544fd735 Mon Sep 17 00:00:00 2001 From: Husen Daudi Date: Tue, 16 Dec 2008 17:13:15 +0530 Subject: [PATCH] Bugfix for encoding (ref:pso) lp bug: https://launchpad.net/bugs/308074 fixed bzr revid: hda@tinyerp.com-20081216114315-jhb4vfs15bt1jzik --- addons/base_module_publish/wizard/module_zip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/base_module_publish/wizard/module_zip.py b/addons/base_module_publish/wizard/module_zip.py index c582358df0a..c3d04ceb5c4 100644 --- a/addons/base_module_publish/wizard/module_zip.py +++ b/addons/base_module_publish/wizard/module_zip.py @@ -42,7 +42,7 @@ def _zippy(archive, fromurl, path, src=True): else: exclude = ['py','pyo','pyc'] if (path.split('.')[-1] not in exclude) or (os.path.basename(path)=='__terp__.py'): - archive.write(os.path.join(fromurl, path), path) + archive.write(os.path.join(fromurl, path).encode(), path.encode()) return True def createzip(cr, uid, moduleid, context, b64enc=True, src=True): @@ -60,7 +60,7 @@ def createzip(cr, uid, moduleid, context, b64enc=True, src=True): if os.path.isdir(os.path.join(ad, name)): archname = StringIO.StringIO('wb') archive = PyZipFile(archname, "w", ZIP_DEFLATED) - archive.writepy(os.path.join(ad, name)) + archive.writepy(os.path.join(ad, name).encode()) _zippy(archive, ad, name, src=src) archive.close() val =archname.getvalue()