Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Processing][Grass] Add the possibility to return a shp if ogr is not…
… compiled with gpkg
  • Loading branch information
lbartoletti authored and nyalldawson committed Jan 30, 2019
1 parent 662af5c commit 2e92dab
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -138,7 +138,13 @@ def svgIconPath(self):
return QgsApplication.iconPath("/providerGrass.svg")

def defaultVectorFileExtension(self, hasGeometry=True):
return 'gpkg'
# By default,'gpkg', but if OGR has not been compiled with sqlite3, then
# we take "SHP"
if 'GPKG' in [o.driverName for o in
QgsVectorFileWriter.ogrDriverList()]:
return 'gpkg'
else:
return 'shp' if hasGeometry else 'dbf'

def supportsNonFileBasedOutput(self):
"""
Expand Down

0 comments on commit 2e92dab

Please sign in to comment.