[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:
parent
cf09360444
commit
cbf2dee7c7
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue