From 60dd7842f012c7aaaa534ce22be06b0db25d86df Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 11 Feb 2009 18:23:35 +0000 Subject: - Added "post_configure_attribute" method to InstrumentationManager, so that the "listen_for_events.py" example works again. [ticket:1314] --- examples/custom_attributes/listen_for_events.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'examples/custom_attributes') diff --git a/examples/custom_attributes/listen_for_events.py b/examples/custom_attributes/listen_for_events.py index c028e0fb4..de28df5b3 100644 --- a/examples/custom_attributes/listen_for_events.py +++ b/examples/custom_attributes/listen_for_events.py @@ -7,11 +7,10 @@ across the board. from sqlalchemy.orm.interfaces import AttributeExtension, InstrumentationManager class InstallListeners(InstrumentationManager): - def instrument_attribute(self, class_, key, inst): + def post_configure_attribute(self, class_, key, inst): """Add an event listener to an InstrumentedAttribute.""" inst.impl.extensions.insert(0, AttributeListener(key)) - return super(InstallListeners, self).instrument_attribute(class_, key, inst) class AttributeListener(AttributeExtension): """Generic event listener. -- cgit v1.2.1