summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-06-11 20:11:05 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-06-11 20:11:05 -0400
commit5cc0bb04749922aa13864e495b70b79e8f3fdaf9 (patch)
treea342ea82152fd4327354445e958dd13a7caaf690 /lib/sqlalchemy/engine/base.py
parent405b00f1de00759b4def7cc893aab9e9eafba63d (diff)
downloadsqlalchemy-5cc0bb04749922aa13864e495b70b79e8f3fdaf9.tar.gz
- [bug] Fixed bug affecting Py3K whereby
string positional parameters passed to engine/connection execute() would fail to be interpreted correctly, due to __iter__ being present on Py3K string. [ticket:2503]. Also in 0.7.8.
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r--lib/sqlalchemy/engine/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py
index f68c31b97..2e05f532c 100644
--- a/lib/sqlalchemy/engine/base.py
+++ b/lib/sqlalchemy/engine/base.py
@@ -1476,7 +1476,7 @@ class Connection(Connectable):
elif len(multiparams) == 1:
zero = multiparams[0]
if isinstance(zero, (list, tuple)):
- if not zero or hasattr(zero[0], '__iter__'):
+ if not zero or isinstance(zero[0], (list, tuple, dict)):
return zero
else:
return [zero]
@@ -1485,7 +1485,7 @@ class Connection(Connectable):
else:
return [[zero]]
else:
- if hasattr(multiparams[0], '__iter__'):
+ if isinstance(multiparams[0], (list, tuple, dict)):
return multiparams
else:
return [multiparams]