Skip to content
Permalink
Browse files

Processing - Fix unicode/str error in postgis_utils

  • Loading branch information
arnaud-morvan committed May 4, 2016
1 parent 0739750 commit 66b1416dfedd21d80e8204c5bffae1f0819b424e
Showing with 6 additions and 4 deletions.
  1. +6 −4 python/plugins/processing/algs/qgis/postgis_utils.py
@@ -93,12 +93,14 @@ def __init__(self, row):
class DbError(Exception):

def __init__(self, message, query=None):
# Save error. funny that the variables are in utf-8
self.message = unicode(message, 'utf-8')
self.query = (unicode(query, 'utf-8') if query is not None else None)
self.message = message
self.query = query

def __str__(self):
return 'MESSAGE: %s\nQUERY: %s' % (self.message, self.query)
return unicode(self).encode('utf-8')

def __unicode__(self):
return u'MESSAGE: %s\nQUERY: %s' % (self.message, self.query)


class TableField:

0 comments on commit 66b1416

Please sign in to comment.
You can’t perform that action at this time.