Mercurial > hg > ChinaGisRestApi
changeset 53:f5bfcfa97e7e
more JSON store
author | casties |
---|---|
date | Fri, 10 Sep 2010 09:27:32 +0200 |
parents | 435d6664ed90 |
children | 54940a99f12d |
files | RestDbInterface.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/RestDbInterface.py Thu Sep 09 20:39:03 2010 +0200 +++ b/RestDbInterface.py Fri Sep 10 09:27:32 2010 +0200 @@ -156,6 +156,11 @@ result format: {"fields":fields, "rows":data}""" logging.debug("executeSQL query=%s args=%s"%(query,args)) cur = self.getCursor(autocommit=autocommit) + if args is not None: + # make sure args is a list + if isinstance(args,basestring): + args = (args,) + cur.execute(query, args) # description of returned fields fields = cur.description