diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-12-05 16:34:43 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-12-05 16:34:43 -0500 |
commit | 0639c199a547343d62134d2f233225fd2862ec45 (patch) | |
tree | 8280164279baa094c60beeb1b833483bba1b8bbd /lib/sqlalchemy/engine/base.py | |
parent | 0ce045bd853ec078943c14fc93b87897d2169882 (diff) | |
download | sqlalchemy-0639c199a547343d62134d2f233225fd2862ec45.tar.gz |
- move inner calls to _revalidate_connection() outside of existing
_handle_dbapi_error(); these are now handled already and the reentrant
call is not needed / breaks things. Adjustment to 41e7253dee168b8c26c49 /
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 901ab07eb..235e1bf43 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -814,11 +814,11 @@ class Connection(Connectable): fn(self, default, multiparams, params) try: - try: - conn = self.__connection - except AttributeError: - conn = self._revalidate_connection() + conn = self.__connection + except AttributeError: + conn = self._revalidate_connection() + try: dialect = self.dialect ctx = dialect.execution_ctx_cls._init_default( dialect, self, conn) @@ -952,11 +952,11 @@ class Connection(Connectable): a :class:`.ResultProxy`.""" try: - try: - conn = self.__connection - except AttributeError: - conn = self._revalidate_connection() + conn = self.__connection + except AttributeError: + conn = self._revalidate_connection() + try: context = constructor(dialect, self, conn, *args) except Exception as e: self._handle_dbapi_exception(e, @@ -1246,6 +1246,7 @@ class Connection(Connectable): @classmethod def _handle_dbapi_exception_noconnection( cls, e, dialect, engine, connection): + exc_info = sys.exc_info() is_disconnect = dialect.is_disconnect(e, None, None) |