[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog - ZCatalog.py:1.99

Andreas Jung andreas@zope.com
Tue, 2 Oct 2001 12:04:03 -0400


Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv2114

Modified Files:
	ZCatalog.py 
Log Message:
Code cleanup


=== Zope/lib/python/Products/ZCatalog/ZCatalog.py 1.98 => 1.99 ===
 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)