Skip to content

Commit a6c3de3

Browse files
committedJul 11, 2015
db_manager: properly parse sqlite version (followup 5b86e38)
1 parent 5b86e38 commit a6c3de3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎python/plugins/db_manager/db_plugins/spatialite/connector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ def hasCreateSpatialViewSupport(self):
126126
return True
127127

128128
def isgpkg(self):
129-
info = float( ".".join( self.getInfo()[0].split('.')[0:2] ) )
130-
if info < 4.2:
129+
info = map( int, self.getInfo()[0].split('.')[0:2] )
130+
if info[0] < 4 or (info[0]==4 and info[1]<2):
131131
result = self.uri().database()[-5:] == ".gpkg"
132132
else:
133133
sql = u"SELECT HasGeoPackage()"

0 commit comments

Comments
 (0)
Please sign in to comment.