Skip to content
Snippets Groups Projects
Commit 3372c096 authored by TravisGabrielUSGS's avatar TravisGabrielUSGS Committed by GitHub
Browse files

Allows the user (or CI) to grab gdal from osgeo instead, if available (#162)

* Allows the user (or CI) to grab gdal from osgeo instead, if available

* Fixing the imported package

* The import error was causing travis-CI to fail.

* Reverting old PR edits and moving attempted oseo import to init
parent 9a04f385
Branches
Tags 1.2.5
No related merge requests found
...@@ -12,6 +12,10 @@ try: ...@@ -12,6 +12,10 @@ try:
ogr = ogr.loader.load_module() ogr = ogr.loader.load_module()
osr = osr.loader.load_module() osr = osr.loader.load_module()
gdal.UseExceptions() gdal.UseExceptions()
except:
try:
gdal = importlib.util.find_spec('osgeo.gdal')
gdal = gdal.loader.load_module()
except: except:
gdal = None gdal = None
ogr = None ogr = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment