From 174a451e35d55419bff3129e9374b01cdd045dc8 Mon Sep 17 00:00:00 2001
From: Yusei Tahara <yusei@nexedi.com>
Date: Thu, 21 May 2015 18:54:45 +0900
Subject: [PATCH] ERP5OOo: stream may be unicode. If so, convert it to utf-8
 string.

---
 product/ERP5OOo/OOoUtils.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/product/ERP5OOo/OOoUtils.py b/product/ERP5OOo/OOoUtils.py
index f7c26eff6b..420d37ce89 100644
--- a/product/ERP5OOo/OOoUtils.py
+++ b/product/ERP5OOo/OOoUtils.py
@@ -110,6 +110,8 @@ class OOoBuilder(Implicit):
     except KeyError:
       # This is a new file
       pass
+    if isinstance(stream, unicode):
+      stream = stream.encode('utf-8')
     zf.writestr(filename, stream)
     zf.close()
 
-- 
2.30.9