[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
This commit is contained in:
Stephane Wirtel 2008-12-11 23:28:01 +01:00
parent cf09360444
commit cbf2dee7c7
1 changed files with 4 additions and 1 deletions

View File

@ -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')