Fix encoding error in migration procedure, otherwise migration procedure breaks on joining output list in case we have there any non-ascii characters. [piv]

svn path=/plone.app.discussion/trunk/; revision=36844
This commit is contained in:
Timo Stollenwerk
2010-05-31 09:58:42 +00:00
parent 4f13054ae4
commit 3d22bc56c4
2 changed files with 6 additions and 0 deletions
@@ -48,6 +48,9 @@ class View(BrowserView):
dtool = context.portal_discussion
def log(msg):
# encode string before sending it to external world
if isinstance(msg, unicode):
msg = msg.encode('utf-8')
context.plone_log(msg)
out.append(msg)