From 569be6c5f18f75a0733443a4714c796db58f5af0 Mon Sep 17 00:00:00 2001 From: Tomas Zigo <50632337+tmszi@users.noreply.github.com> Date: Wed, 26 Oct 2022 05:27:13 +0200 Subject: [PATCH] python/grass/pygrass: reset back MAPSET search path after GridModule class instance finish (#2567) * Fix copy_mapset() func doc test --- python/grass/pygrass/modules/grid/grid.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python/grass/pygrass/modules/grid/grid.py b/python/grass/pygrass/modules/grid/grid.py index fe9cb2140b2..d03edc874f3 100644 --- a/python/grass/pygrass/modules/grid/grid.py +++ b/python/grass/pygrass/modules/grid/grid.py @@ -93,10 +93,9 @@ def copy_mapset(mapset, path): >>> sorted(os.listdir(os.path.join(path, 'PERMANENT'))) ['DEFAULT_WIND', 'PROJ_INFO', 'PROJ_UNITS', 'VAR', 'WIND'] >>> sorted(os.listdir(os.path.join(path, mname))) # doctest: +ELLIPSIS - [...'SEARCH_PATH',...'WIND'] + [...'WIND'...] >>> import shutil >>> shutil.rmtree(path) - """ per_old = os.path.join(mapset.gisdbase, mapset.location, "PERMANENT") per_new = os.path.join(path, "PERMANENT") @@ -705,9 +704,6 @@ def run(self, patch=True, clean=True): def patch(self): """Patch the final results.""" bboxes = split_region_tiles(width=self.width, height=self.height) - loc = Location() - mset = loc[self.mset.name] - mset.visible.extend(loc.mapsets()) noutputs = 0 for otmap in self.module.outputs: otm = self.module.outputs[otmap]