Skip to content

Commit

Permalink
python/grass/pygrass: reset back MAPSET search path after GridModule …
Browse files Browse the repository at this point in the history
…class instance finish (#2567)

* Fix copy_mapset() func doc test
  • Loading branch information
tmszi committed Oct 26, 2022
1 parent 5ed0cc2 commit de1eeb1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions python/grass/pygrass/modules/grid/grid.py
Expand Up @@ -91,10 +91,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")
Expand Down Expand Up @@ -651,9 +650,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]
Expand Down

0 comments on commit de1eeb1

Please sign in to comment.