diff options
| author | Miguel Ventura <miguel.ventura@gmail.com> | 2018-05-14 16:56:58 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-05-17 12:23:10 -0400 |
| commit | 0b0b58c938c6a38fccc3e0ba59876b3b6b4f8009 (patch) | |
| tree | 7482bb46bf1e352b184644ce549686ee8befe0e6 /lib/sqlalchemy/sql/elements.py | |
| parent | 432d24ab1aac04a8ec881919964ff47ad8154659 (diff) | |
| download | sqlalchemy-0b0b58c938c6a38fccc3e0ba59876b3b6b4f8009.tar.gz | |
Fix string formatting TypeError if tuple is passed
Fixed issue where the "ambiguous literal" error message used when
interpreting literal values as SQL expression values would encounter a
tuple value, and fail to format the message properly. Pull request courtesy
Miguel Ventura.
Change-Id: I50d5d32d5f80ec79703a42d4b19b42c2f9701f24
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/442
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
| -rw-r--r-- | lib/sqlalchemy/sql/elements.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 22636a05b..2e8c39f3b 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -4283,7 +4283,7 @@ def _no_literals(element): raise exc.ArgumentError("Ambiguous literal: %r. Use the 'text()' " "function to indicate a SQL expression " "literal, or 'literal()' to indicate a " - "bound value." % element) + "bound value." % (element, )) else: return element |
