Log message for revision 69660:
  - Fix #2155: Wrong parameters being passed to logger's error().
  

Changed:
  U   Zope/trunk/doc/CHANGES.txt
  U   Zope/trunk/lib/python/ZPublisher/BeforeTraverse.py
  A   Zope/trunk/lib/python/ZPublisher/tests/testBeforeTraverse.py

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt  2006-08-18 16:46:42 UTC (rev 69659)
+++ Zope/trunk/doc/CHANGES.txt  2006-08-18 16:51:53 UTC (rev 69660)
@@ -29,6 +29,9 @@
 
     Bugs Fixed
 
+      - Collector #2155: Fix wrong parameter being passed to
+        logger's error() method, with tests.
+
       - Collector #2157: Expose name of broken class in SystemError raised
         from '__getstate__' of a broken instance.
 

Modified: Zope/trunk/lib/python/ZPublisher/BeforeTraverse.py
===================================================================
--- Zope/trunk/lib/python/ZPublisher/BeforeTraverse.py  2006-08-18 16:46:42 UTC 
(rev 69659)
+++ Zope/trunk/lib/python/ZPublisher/BeforeTraverse.py  2006-08-18 16:51:53 UTC 
(rev 69660)
@@ -16,7 +16,6 @@
 
 from Acquisition import aq_base
 from logging import getLogger
-import sys
 
 # Interface
 
@@ -106,7 +105,7 @@
                 cob(container, request)
             except TypeError:
                 LOG.error('%s call %s failed.' % (
-                    `self._hookname`, `cob`), exc_info=sys.exc_info())
+                    `self._hookname`, `cob`), exc_info=True)
 
     def add(self, cob):
         self._list.append(cob)
@@ -151,6 +150,5 @@
             # Only catch exceptions that are likely to be logic errors.
             # We shouldn't catch Redirects, Unauthorizeds, etc. since
             # the programmer may want to raise them deliberately.
-            
             LOG.error('BeforeTraverse: Error while invoking hook: "%s"' % 
self.name, 
-                      exc_info=sys.exc_info())
+                      exc_info=True)

Copied: Zope/trunk/lib/python/ZPublisher/tests/testBeforeTraverse.py (from rev 
69659, Zope/branches/2.10/lib/python/ZPublisher/tests/testBeforeTraverse.py)

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to