[Zope-Checkins] CVS: Zope/lib/python/OFS - ObjectManager.py:1.174

Shane Hathaway shane at zope.com
Wed Mar 31 17:41:14 EST 2004


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv23624

Modified Files:
	ObjectManager.py 
Log Message:
In FTP, log any failed attempts to stat subobjects.

Still show the directory, though.


=== Zope/lib/python/OFS/ObjectManager.py 1.173 => 1.174 ===
--- Zope/lib/python/OFS/ObjectManager.py:1.173	Tue Mar 23 01:51:13 2004
+++ Zope/lib/python/OFS/ObjectManager.py	Wed Mar 31 17:41:13 2004
@@ -613,13 +613,14 @@
         for k,v in files:
             # Note that we have to tolerate failure here, because
             # Broken objects won't stat correctly. If an object fails
-            # to be able to stat itself, we will ignore it.
-            try:    stat=marshal.loads(v.manage_FTPstat(REQUEST))
+            # to be able to stat itself, we will ignore it, but log
+            # the error.
+            try:
+                stat=marshal.loads(v.manage_FTPstat(REQUEST))
             except:
+                LOG("FTP", ERROR, "Failed to stat file '%s'" % k,
+                    error=sys.exc_info())
                 stat=None
-                if k != "Control_Panel":
-                    __traceback_info__ = (k, v)
-                    raise
             if stat is not None:
                 out=out+((k,stat),)
         return marshal.dumps(out)




More information about the Zope-Checkins mailing list