diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-05-26 17:03:03 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-05-26 17:03:03 +0000 |
commit | 853992649c64252c3959b76600434f9cab05288c (patch) | |
tree | a8555d0cd2ce8757119d969a53484e8f7fbf1a48 /lib/sqlalchemy/exc.py | |
parent | d6b9757778edea97bdbda5c98eb61b37d93296cc (diff) | |
download | sqlalchemy-853992649c64252c3959b76600434f9cab05288c.tar.gz |
more fixes to bound parameter exception reportingrel_0_5_4p2
Diffstat (limited to 'lib/sqlalchemy/exc.py')
-rw-r--r-- | lib/sqlalchemy/exc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/exc.py b/lib/sqlalchemy/exc.py index e0310d03c..ce130ce3c 100644 --- a/lib/sqlalchemy/exc.py +++ b/lib/sqlalchemy/exc.py @@ -132,11 +132,11 @@ class DBAPIError(SQLAlchemyError): self.connection_invalidated = connection_invalidated def __str__(self): - if self.params and len(self.params) > 10: + if isinstance(self.params, (list, tuple)) and len(self.params) > 10 and isinstance(self.params[0], (list, dict, tuple)): return ' '.join((SQLAlchemyError.__str__(self), repr(self.statement), repr(self.params[:2]), - '... and a total of %i bound parameters' % len(self.params))) + '... and a total of %i bound parameter sets' % len(self.params))) return ' '.join((SQLAlchemyError.__str__(self), repr(self.statement), repr(self.params))) |