[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndex - TextIndex.py:1.25.4.1
Andreas Jung
andreas@digicool.com
Mon, 18 Feb 2002 10:41:06 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndex
In directory cvs.zope.org:/tmp/cvs-serv26668/lib/python/Products/PluginIndexes/TextIndex
Modified Files:
Tag: Zope-2_5-branch
TextIndex.py
Log Message:
- Collector #227: improved handling of unicode string in TextIndex.py
with unmodified default encoding in site.py.
=== Zope/lib/python/Products/PluginIndexes/TextIndex/TextIndex.py 1.25 => 1.25.4.1 ===
source = getattr(obj, self.id)
if callable(source):
- source = str(source())
- else:
+ source = source()
+
+ if not isinstance(source, UnicodeType):
source = str(source)
+
except (AttributeError, TypeError):
return 0