summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/event.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-08-29 11:22:46 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-08-29 11:22:46 -0400
commit1149197a36f01dae1f8da82b7cfb73a7777e7a4a (patch)
tree3b2cacd6c9fc75c51862eb886420036b7cd08c47 /lib/sqlalchemy/event.py
parenta635750213c346a895e417ae8e629ce924d557e8 (diff)
downloadsqlalchemy-1149197a36f01dae1f8da82b7cfb73a7777e7a4a.tar.gz
- moved out to on_before_execute, on_after_execute. not much option here,
need both forms, the wrapping thing is just silly - fixed the listen() to not re-wrap continuously.
Diffstat (limited to 'lib/sqlalchemy/event.py')
-rw-r--r--lib/sqlalchemy/event.py19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/sqlalchemy/event.py b/lib/sqlalchemy/event.py
index 28ed7f563..5448503b2 100644
--- a/lib/sqlalchemy/event.py
+++ b/lib/sqlalchemy/event.py
@@ -143,26 +143,11 @@ class _ListenerCollection(object):
self(*args, **kw)
self._exec_once = True
- def exec_until_return(self, *args, **kw):
- """Execute listeners for this event until
- one returns a non-None value.
-
- Returns the value, or None.
- """
-
- if self:
- for fn in self:
- r = fn(*args, **kw)
- if r is not None:
- return r
- return None
-
def __call__(self, *args, **kw):
"""Execute this event."""
- if self:
- for fn in self:
- fn(*args, **kw)
+ for fn in self:
+ fn(*args, **kw)
# I'm not entirely thrilled about the overhead here,
# but this allows class-level listeners to be added