[Zope-CMF] Patch for print in DirectoryView.py

Chris Withers chrisw@nipltd.com
Sun, 3 Jun 2001 11:26:52 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_072E_01C0EC20.1695D280
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi,

I found another print-ish statement, this time in DirectoryView.py.

Here's the patch :-)

cheers,

Chris


------=_NextPart_000_072E_01C0EC20.1695D280
Content-Type: application/octet-stream;
	name="DirectoryView.py.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="DirectoryView.py.patch"

--- DirectoryView.py.original	Thu May 17 14:57:52 2001
+++ DirectoryView.py	Sun Jun 03 11:16:10 2001
@@ -197,12 +197,16 @@
                 self.data, self.objects = self.prepareContents(registry,
                     register_subdirs=changed)
             except:
-                # DEBUG
-                import traceback
-                traceback.print_exc()
-
+                from zLOG import LOG, ERROR
+                import sys
+                type,value,tb = sys.exc_info()
+                LOG('DirectoryView',
+                    ERROR,
+                    'Error during prepareContents:',
+                    "\nType:%s\nValue:%s\n" % (type,value))
                 self.data = {}
                 self.objects = ()
+                    
         return self.data, self.objects
 
     def prepareContents(self, registry, register_subdirs=0):

------=_NextPart_000_072E_01C0EC20.1695D280--