[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/Transience/ Fix for collector #1403.

Chris McDonough chrism at plope.com
Sat Jul 3 20:26:24 EDT 2004


Log message for revision 26099:
Fix for collector #1403.



-=-
Modified: Zope/trunk/lib/python/Products/Transience/Transience.py
===================================================================
--- Zope/trunk/lib/python/Products/Transience/Transience.py	2004-07-04 00:11:04 UTC (rev 26098)
+++ Zope/trunk/lib/python/Products/Transience/Transience.py	2004-07-04 00:26:23 UTC (rev 26099)
@@ -717,10 +717,10 @@
                 method = self.unrestrictedTraverse(callback)
             except (KeyError, AttributeError):
                 path = self.getPhysicalPath()
-                err = 'No such method %s in %s %s'
+                err = 'No such onAdd/onDelete method %s referenced via %s'
                 LOG('Transience',
                     WARNING,
-                    err % (callback, '/'.join(path), name),
+                    err % (callback, '/'.join(path)),
                     error=sys.exc_info()
                     )
                 return

Modified: Zope/trunk/lib/python/Products/Transience/tests/testTimeoutRelated.py
===================================================================
--- Zope/trunk/lib/python/Products/Transience/tests/testTimeoutRelated.py	2004-07-04 00:11:04 UTC (rev 26098)
+++ Zope/trunk/lib/python/Products/Transience/tests/testTimeoutRelated.py	2004-07-04 00:26:23 UTC (rev 26099)
@@ -117,6 +117,10 @@
         self.assertEqual(type(k), type(now))
         self.assert_(k <= now)
 
+    def testMissingCallbackGetCallbackReturnsNone(self):
+        # in response to http://zope.org/Collectors/Zope/1403
+        self.assertEqual(None, self.app.sm._getCallback('/foo/bar/baz'))
+
 def addNotificationTarget(item, context):
     item['starttime'] = fauxtime.time()
 



More information about the Zope-Checkins mailing list