]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Repaired the printing of SQL exceptions which are not
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 25 May 2009 15:26:16 +0000 (15:26 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 25 May 2009 15:26:16 +0000 (15:26 +0000)
based on parameters.

CHANGES
lib/sqlalchemy/__init__.py
lib/sqlalchemy/exc.py

diff --git a/CHANGES b/CHANGES
index 165d2ec07930c8e10180ad49becfa6ef259b6eab..a2ba1c57209a45d970971ea2c7ae8838da8a29ce 100644 (file)
--- 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
 =======
 
index 5502aa7b840e0813bcc6dc465caa01b76a5eafd1..a94af097a5f90eedbbde0793736fa1b5f17e4b0b 100644 (file)
@@ -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
index b424b806a1795e7484139de7e26d32c2f349e7ee..e0310d03c1c6a24f98c24d66b928f9440e76d0a6 100644 (file)
@@ -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]),