[Zodb-checkins] CVS: ZODB3/Tools - zodbload.py:1.4

Jeremy Hylton cvs-admin at zope.org
Wed Nov 19 10:36:32 EST 2003


Update of /cvs-repository/ZODB3/Tools
In directory cvs.zope.org:/tmp/cvs-serv1628

Modified Files:
	zodbload.py 
Log Message:
getObject() somtimes returns None.


=== ZODB3/Tools/zodbload.py 1.3 => 1.4 ===
--- ZODB3/Tools/zodbload.py:1.3	Thu Oct  2 14:17:26 2003
+++ ZODB3/Tools/zodbload.py	Wed Nov 19 10:36:31 2003
@@ -424,7 +424,11 @@
         results = cat(PrincipiaSearchSource=term)
         n += len(results)
         for result in results:
-            did = result.getObject().getId()
+            obj = result.getObject()
+            # Apparently, there is a bug in Zope that leads obj to be None
+            # on occasion.
+            if obj is not None:
+                obj.getId()
 
     return n
 




More information about the Zodb-checkins mailing list