summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
authorMiguel Ventura <miguel.ventura@gmail.com>2018-05-14 16:56:58 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2018-05-17 12:23:10 -0400
commit0b0b58c938c6a38fccc3e0ba59876b3b6b4f8009 (patch)
tree7482bb46bf1e352b184644ce549686ee8befe0e6 /lib/sqlalchemy/sql/elements.py
parent432d24ab1aac04a8ec881919964ff47ad8154659 (diff)
downloadsqlalchemy-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.py2
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