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

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


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

Modified Files:
      Tag: Zope-2_7-branch
	ObjectManager.py 
Log Message:
Log failed attempts to stat subobjects.


=== Zope/lib/python/OFS/ObjectManager.py 1.163.12.9 => 1.163.12.10 ===
--- Zope/lib/python/OFS/ObjectManager.py:1.163.12.9	Tue Mar 23 06:30:43 2004
+++ Zope/lib/python/OFS/ObjectManager.py	Wed Mar 31 17:42:04 2004
@@ -613,9 +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))
-            except: stat=None
+            # 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 stat is not None:
                 out=out+((k,stat),)
         return marshal.dumps(out)




More information about the Zope-Checkins mailing list