[GRASS-SVN] r72368 - grass/trunk/lib/python/pygrass/modules/grid

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 16 00:20:59 PDT 2018


Author: zarch
Date: 2018-03-16 00:20:58 -0700 (Fri, 16 Mar 2018)
New Revision: 72368

Modified:
   grass/trunk/lib/python/pygrass/modules/grid/grid.py
Log:
pygrass: grid avoid to add a mapset if already present in the path

Modified: grass/trunk/lib/python/pygrass/modules/grid/grid.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/grid/grid.py	2018-03-16 07:20:49 UTC (rev 72367)
+++ grass/trunk/lib/python/pygrass/modules/grid/grid.py	2018-03-16 07:20:58 UTC (rev 72368)
@@ -146,7 +146,8 @@
     src = Mapset(msrc, lsrc, gsrc)
     dst = Mapset(mdst, ldst, gdst)
     visible = [m for m in src.visible]
-    visible.append(src.name)
+    if src.name not in visible:
+        visible.append(src.name)
     dst.visible.extend(visible)
     return src, dst
 



More information about the grass-commit mailing list