Skip to content

Commit

Permalink
Python: Avoid passing Path obj to ogr.Open
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaston committed May 1, 2024
1 parent 9b9bb81 commit 0b924f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/src/exactextract/exact_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def prep_vec(vec):
from osgeo import gdal, ogr

if isinstance(vec, (str, os.PathLike)):
vec = ogr.Open(vec)
vec = ogr.Open(str(vec))

if isinstance(vec, (gdal.Dataset, ogr.DataSource, ogr.Layer)):
return GDALFeatureSource(vec)
Expand Down

0 comments on commit 0b924f9

Please sign in to comment.