diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-11-22 18:35:36 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-11-22 18:35:36 -0500 |
commit | f112dc1d533033f19186eb65227aba1660d03102 (patch) | |
tree | 1a255501f17ddab100b749aff18349b74980a518 /lib/sqlalchemy/engine/base.py | |
parent | 467784e89c0817a74df32db4b12bd8b3e28a05df (diff) | |
download | sqlalchemy-f112dc1d533033f19186eb65227aba1660d03102.tar.gz |
- Fixed bug where SQL statement would be improperly ASCII-encoded
when a pre-DBAPI :class:`.StatementError` were raised within
:meth:`.Connection.execute`, causing encoding errors for
non-ASCII statements. The stringification now remains within
Python unicode thus avoiding encoding errors. [ticket:2871]
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 6110992bb..1c6a4cc4c 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -824,7 +824,7 @@ class Connection(Connectable): context = constructor(dialect, self, conn, *args) except Exception as e: self._handle_dbapi_exception(e, - str(statement), parameters, + util.text_type(statement), parameters, None, None) if context.compiled: |