diff options
| author | Stephane Wirtel <stephane@tinyerp.com> | 2008-12-11 23:28:01 +0100 |
|---|---|---|
| committer | Stephane Wirtel <stephane@tinyerp.com> | 2008-12-11 23:28:01 +0100 |
| commit | cbf2dee7c7a0b71759c5aebad2d974030ac84b88 (patch) | |
| tree | aee5150f5795ae01584ecd4f356c58acf67ee808 /bin/sql_db.py | |
| parent | cf0936044472a84461791f7aa3dbb1a9f41737b6 (diff) | |
[FIX] The second parameter of the map function must support iteration
lp bug: https://launchpad.net/bugs/307284 fixed
bzr revid: stephane@tinyerp.com-20081211222801-343rhnfmr21fw7le
Diffstat (limited to 'bin/sql_db.py')
| -rw-r--r-- | bin/sql_db.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/sql_db.py b/bin/sql_db.py index 4286a98da2f..cf9aa75ac4e 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -69,8 +69,11 @@ class Cursor(object): self.dbname = pool.dbname def execute(self, query, params=None): - if not params: + if params is None: params=() + if not isinstance(params, (tuple, list)): + params = (params,) + def base_string(s): if isinstance(s, unicode): return s.encode('utf-8') |
