From: Mike Bayer Date: Mon, 25 May 2009 15:26:16 +0000 (+0000) Subject: - Repaired the printing of SQL exceptions which are not X-Git-Tag: rel_0_5_4p2~2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3837a29bfc082b8e718eba007456e3a025238c1d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Repaired the printing of SQL exceptions which are not based on parameters. --- diff --git a/CHANGES b/CHANGES index 165d2ec079..a2ba1c5720 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,13 @@ CHANGES ======= +0.5.4p2 +======= + +- sql + - Repaired the printing of SQL exceptions which are not + based on parameters. + 0.5.4p1 ======= diff --git a/lib/sqlalchemy/__init__.py b/lib/sqlalchemy/__init__.py index 5502aa7b84..a94af097a5 100644 --- a/lib/sqlalchemy/__init__.py +++ b/lib/sqlalchemy/__init__.py @@ -107,6 +107,6 @@ from sqlalchemy.engine import create_engine, engine_from_config __all__ = sorted(name for name, obj in locals().items() if not (name.startswith('_') or inspect.ismodule(obj))) -__version__ = '0.5.4p1' +__version__ = '0.5.4p2' del inspect, sys diff --git a/lib/sqlalchemy/exc.py b/lib/sqlalchemy/exc.py index b424b806a1..e0310d03c1 100644 --- a/lib/sqlalchemy/exc.py +++ b/lib/sqlalchemy/exc.py @@ -132,7 +132,7 @@ class DBAPIError(SQLAlchemyError): self.connection_invalidated = connection_invalidated def __str__(self): - if len(self.params) > 10: + if self.params and len(self.params) > 10: return ' '.join((SQLAlchemyError.__str__(self), repr(self.statement), repr(self.params[:2]),