pygeoprocessing.utils module

class pygeoprocessing.utils.GDALUseExceptions[source]

Bases: object

Context manager that enables GDAL exceptions and restores state after.

pygeoprocessing.utils.gdal_use_exceptions(func)[source]

Decorator that enables GDAL exceptions and restores state after.

Parameters:

func (callable) – function to call with GDAL exceptions enabled

Returns:

Wrapper function that calls func with GDAL exceptions enabled