From 3e3f02eb11cf33442f895a12fe7caa54fb361742 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Thu, 28 Oct 2010 13:53:02 +0000
Subject: [PATCH] we don't care UnicodeDecodeError in getting old object XML,
 otherwise we cannot update erp5_xhtml_style business template with r39494
 change.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39613 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/BusinessTemplate.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index 6ffd172c39..15413cf7b7 100644
--- a/product/ERP5/Document/BusinessTemplate.py
+++ b/product/ERP5/Document/BusinessTemplate.py
@@ -869,7 +869,8 @@ class ObjectTemplateItem(BaseTemplateItem):
         try:
           OFS.XMLExportImport.exportXML(old_object._p_jar, old_object._p_oid, old_io)
           old_obj_xml = old_io.getvalue()
-        except ImportError, e: # module is already removed etc.
+        except (ImportError, UnicodeDecodeError), e: # module is already
+                                                     # removed etc.
           old_obj_xml = '(%s: %s)' % (e.__class__.__name__, e)
         new_io.close()
         old_io.close()
-- 
2.30.9