Commit 584a272d authored by Chris McDonough's avatar Chris McDonough

Fix for collector #1403.

parent ca3956f4
......@@ -717,10 +717,10 @@ class TransientObjectContainer(SimpleItem):
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
......
......@@ -117,6 +117,10 @@ class TestNotifications(TestBase):
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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment