Mercurial > hg > ZDBInterface
diff DBInterface.py @ 18:60fea3a6c695
better fix for psycopg 2.4. better quoting of sql arguments.
author | casties |
---|---|
date | Thu, 23 Feb 2012 21:17:14 +0100 |
parents | 5b99c04c567c |
children | 132ae1c0255a |
line wrap: on
line diff
--- a/DBInterface.py Thu Feb 23 08:33:48 2012 +0100 +++ b/DBInterface.py Thu Feb 23 21:17:14 2012 +0100 @@ -171,11 +171,15 @@ cur.execute(query, args) # description of returned fields fields = cur.description - logging.debug("fields: %s"%repr(fields)) + #logging.debug("fields: %s"%repr(fields)) if len(fields) > 0: # re-pack Column object in tuple - fields = (f[0:] for f in fields) - logging.debug("re-packed fields: %s"%repr(fields)) + fs = [] + for f in fields: + fs.append(f[0:]) + + fields = fs + #logging.debug("re-packed fields: %s"%repr(fields)) if hasResult: # get all data in an array