Skip to content
Permalink
Browse files
[BUGFIX][Processing] Fix spatialite version comparison
  • Loading branch information
rldhont committed Apr 20, 2017
1 parent 41af40c commit 5eadc4594b3df2eb40027e47c7f7899cdb9b5483
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 5eadc45

Please sign in to comment.