changeset 16:5b99c04c567c

fix for psycopg 2.4 Column type.
author casties
date Wed, 22 Feb 2012 18:53:05 +0100
parents 9fb0d4f24486
children 48ed91b29784
files DBInterface.py version.txt
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/DBInterface.py	Thu Nov 17 14:06:52 2011 +0100
+++ b/DBInterface.py	Wed Feb 22 18:53:05 2012 +0100
@@ -171,6 +171,12 @@
         cur.execute(query, args)
         # description of returned fields 
         fields = cur.description
+        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))
+            
         if hasResult:
             # get all data in an array
             data = cur.fetchall()
--- a/version.txt	Thu Nov 17 14:06:52 2011 +0100
+++ b/version.txt	Wed Feb 22 18:53:05 2012 +0100
@@ -1,1 +1,1 @@
-1.4
\ No newline at end of file
+1.5
\ No newline at end of file