Fix access to member variable in classmethod

This commit is contained in:
Matthias Kuhn 2017-10-16 23:45:55 +02:00
parent 118e303a8d
commit 5bf300d79f

View File

@ -200,9 +200,9 @@ class GPKGDBConnector(DBConnector):
raise DbError(e)
@classmethod
def isValidDatabase(self, path):
def isValidDatabase(cls, path):
if hasattr(gdal, 'OpenEx'):
ds = gdal.OpenEx(self.dbname)
ds = gdal.OpenEx(path)
if ds is None or ds.GetDriver().ShortName != 'GPKG':
return False
else: