Commit 08c9a9cd authored by Yoshinori Okuji's avatar Yoshinori Okuji

I don't know why, but the value of an attribute sometimes becomes a unicode

string. Uggh.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3694 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 070819ec
...@@ -400,8 +400,8 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -400,8 +400,8 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
elif type(value) in (type(()), type([])): elif type(value) in (type(()), type([])):
f.write(' <property id=%s type="tuple">\n' % quoteattr(id)) f.write(' <property id=%s type="tuple">\n' % quoteattr(id))
for item in value: for item in value:
if type(item) == type(""): if type(item) in (type(""), type(u"")):
f.write(' <item type="str">%s</item>\n' % escape(item)) f.write(' <item type="str">%s</item>\n' % escape(str(item)))
else: else:
# Ignore the other types at the moment. # Ignore the other types at the moment.
pass pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment