Skip to content
Permalink
Browse files
[BUGFIX][Processing] Fix spatialite version comparison
  • Loading branch information
rldhont committed Apr 20, 2017
1 parent 5b8c083 commit 1bbc39e887c3acc921bc82d6b5ab0b5dfc1ee435
Showing with 2 additions and 3 deletions.
  1. +2 −3 python/plugins/processing/tools/spatialite.py
@@ -67,11 +67,10 @@ def init_spatialite(self):
try:
self._exec_sql(c, u'SELECT spatialite_version()')
rep = c.fetchall()
v = [int(a) for a in rep[0][0].split('.')]
vv = v[0] * 100000 + v[1] * 1000 + v[2] * 10
v = [int(x) if x.isdigit() else x for x in re.findall("\d+|[a-zA-Z]+", rep[0][0])]

# Add spatialite support
if vv >= 401000:
if v >= [4, 1, 0]:
# 4.1 and above
sql = "SELECT initspatialmetadata(1)"
else:

0 comments on commit 1bbc39e

Please sign in to comment.