Skip to content

Commit

Permalink
[BUGFIX][Processing] Fix spatialite version comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Apr 20, 2017
1 parent 41af40c commit 5eadc45
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/plugins/processing/tools/spatialite.py
Expand Up @@ -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:
Expand Down

0 comments on commit 5eadc45

Please sign in to comment.