Skip to content

Commit

Permalink
Merge pull request #402 from emlys/gdal-exceptions-decorator-wrap
Browse files Browse the repository at this point in the history
use functools.wraps with gdal exceptions decorator
  • Loading branch information
phargogh authored Jun 28, 2024
2 parents 1cb674c + 2fd5841 commit e59c09c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pygeoprocessing/geoprocessing_core.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import functools
import logging
import multiprocessing
import os
Expand Down Expand Up @@ -71,6 +72,7 @@ def gdal_use_exceptions(func):
Returns:
Wrapper function that calls ``func`` with GDAL exceptions enabled
"""
@functools.wraps(func)
def wrapper(*args, **kwargs):
with GDALUseExceptions():
return func(*args, **kwargs)
Expand Down

0 comments on commit e59c09c

Please sign in to comment.