Fix pgmanager logging in Python3.
authorRadek Brich <radek.brich@devl.cz>
Wed, 01 Jun 2011 11:48:07 +0200
changeset 1 ddce8990b976
parent 0 eaae9539e910
child 4 80634cb1c65b
Fix pgmanager logging in Python3.
.hgignore
pgtools/pgmanager.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Wed Jun 01 11:48:07 2011 +0200
@@ -0,0 +1,1 @@
+.*\.pyc
--- a/pgtools/pgmanager.py	Thu May 26 18:09:05 2011 +0200
+++ b/pgtools/pgmanager.py	Wed Jun 01 11:48:07 2011 +0200
@@ -103,13 +103,13 @@
         try:
             return super(Cursor, self).execute(query, args)
         finally:
-            log.debug(self.query)
+            log.debug(self.query.decode('utf8'))
 
     def callproc(self, procname, args=None):
         try:
             return super(Cursor, self).callproc(procname, args)
         finally:
-            log.debug(self.query)
+            log.debug(self.query.decode('utf8'))
 
     def row_dict(self, row, lstrip=None):
         adjustname = lambda a: a