[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog - ZCatalog.py:1.92.2.7
Andreas Jung
andreas@zope.com
Tue, 2 Oct 2001 11:46:59 -0400
Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv30524
Modified Files:
Tag: Zope-2_4-branch
ZCatalog.py
Log Message:
minor code cleanup
=== Zope/lib/python/Products/ZCatalog/ZCatalog.py 1.92.2.6 => 1.92.2.7 ===
from Products.PluginIndexes.TextIndex.Vocabulary import Vocabulary
from Products.PluginIndexes.TextIndex import Splitter
-import string, urllib, os, sys, time
+import string, urllib, os, sys, time, types
+
-StringType=type('')
manage_addZCatalogForm=DTMLFile('dtml/addZCatalog',globals())
@@ -492,7 +492,7 @@
"method if no unique id is provided when cataloging"
)
else: uid=string.join(uid(), '/')
- elif type(uid) is not StringType:
+ elif not isinstance(uid,types.StringType):
raise CatalogError('The object unique id must be a string.')
self._catalog.catalogObject(obj, uid, None,idxs)