diff --git a/src/raster/r.earthworks/r.earthworks.py b/src/raster/r.earthworks/r.earthworks.py index f1933a3304..edaf4f7f51 100644 --- a/src/raster/r.earthworks/r.earthworks.py +++ b/src/raster/r.earthworks/r.earthworks.py @@ -1249,6 +1249,10 @@ def main(): # Run processes try: + # Use a temporary region so the user's computational region is + # restored on exit, including when the module exits with an error + gs.use_temp_region() + # Convert inputs if raster: coordinates = convert_raster(raster)