[Zope-CVS] CVS: Products/Ape/lib/apelib/fs - connection.py:1.9

Shane Hathaway shane at zope.com
Wed Mar 17 20:05:42 EST 2004


Update of /cvs-repository/Products/Ape/lib/apelib/fs
In directory cvs.zope.org:/tmp/cvs-serv8002/fs

Modified Files:
	connection.py 
Log Message:
Don't loop forever on unlinked OIDs, and start with an empty database.


=== Products/Ape/lib/apelib/fs/connection.py 1.8 => 1.9 ===
--- Products/Ape/lib/apelib/fs/connection.py:1.8	Sat Feb 28 15:06:27 2004
+++ Products/Ape/lib/apelib/fs/connection.py	Wed Mar 17 20:05:11 2004
@@ -627,13 +627,14 @@
                 written += 1
                 del self._pending[oid]
 
-            if DEBUG and not written:
+            if not written:
                 # Nothing was written in this pass.  This means that
                 # the rest of the queued objects are not actually
                 # linked into the object system.  Toss them.
-                tossing = self._pending.keys()
-                tossing.sort()
-                print "tossing: %s" % ', '.join(tossing)
+                if DEBUG:
+                    tossing = self._pending.keys()
+                    tossing.sort()
+                    print "tossing: %s" % ', '.join(tossing)
                 break
 
 
@@ -667,7 +668,9 @@
         if self.app_filename:
             # If there are objects at basepath, create a _root
             # containing an application also.
-            if self.afs.computeContents(self.basepath):
+            contents = self.afs.computeContents(self.basepath)
+            fn_to_name, name_to_fn = contents
+            if fn_to_name:
                 self._do_linkApp(1)
 
     def begin(self):




More information about the Zope-CVS mailing list