Skip to content

Commit

Permalink
[processing] make spatialite connector work with python3
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Oct 21, 2016
1 parent 772f201 commit d83e650
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/plugins/processing/tools/spatialite.py
Expand Up @@ -29,13 +29,15 @@

from qgis.utils import spatialite_connect

import sqlite3 as sqlite


class DbError(Exception):

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

def __str__(self):
return 'MESSAGE: %s\nQUERY: %s' % (self.message, self.query)
Expand Down

0 comments on commit d83e650

Please sign in to comment.