diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-09 23:34:23 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-09 23:34:23 -0400 |
commit | f665ae746428cdb69e97d4576da29268a388569a (patch) | |
tree | a997fe24b9f0c7e7fa9df600b3e8f750b497d038 /lib/sqlalchemy/engine/base.py | |
parent | a9288ca5bd979d8aab9921f71bf5b722b1c3ab3d (diff) | |
download | sqlalchemy-f665ae746428cdb69e97d4576da29268a388569a.tar.gz |
this reorganizes things so the EventDescriptor and all is on a "Dispatch" object.
this leaves the original Event class alone so sphinx documents it.
this is all a mess right now but the pool/engine tests are working fully
at the moment so wanted to mark a working version.
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 7b6ff5b7a..8d1138316 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -1554,7 +1554,7 @@ class EngineEvents(event.Events): if issubclass(target.Connection, Connection): target.Connection = _proxy_connection_cls( Connection, - target.events) + target.dispatch) event.Events.listen(fn, identifier, target) def on_execute(self, conn, execute, clauseelement, *multiparams, **params): @@ -1627,7 +1627,7 @@ class Engine(Connectable, log.Identified): self.update_execution_options(**execution_options) - events = event.dispatcher(EngineEvents) + dispatch = event.dispatcher(EngineEvents) def update_execution_options(self, **opt): """update the execution_options dictionary of this :class:`Engine`. @@ -1851,11 +1851,7 @@ def _proxy_connection_cls(cls, dispatch): return orig def go(*arg, **kw): nested = _exec_recursive(conn, fns[1:], orig) - try: - ret = fns[0](conn, nested, *arg, **kw) - except IndexError: - import pdb - pdb.set_trace() + ret = fns[0](conn, nested, *arg, **kw) # TODO: need to get consistent way to check # for "they called the fn, they didn't", or otherwise # make some decision here how this is to work |