Hamish wrote:

> It tries to run grass.raster_history() without first testing
> if the map is in the current mapset.

Given that those maps are listed as inputs, it's debatable whether it
should be modifying the history even if those maps are in the current
mapset.

In any case, the corresponding fix is:

--- scripts/i.landsat.rgb/i.landsat.rgb.py      (revision 48120)
+++ scripts/i.landsat.rgb/i.landsat.rgb.py      (working copy)
@@ -124,8 +124,10 @@
            set_colors(i, v0, v1)
 
     # write cmd history:
+    mapset = grass.gisenv()['MAPSET']
     for i in [red, green, blue]:
-       grass.raster_history(i)
+        if grass.find_file(i)['mapset'] == mapset:
+            grass.raster_history(i)
 
 if __name__ == "__main__":
     options, flags = grass.parser()

-- 
Glynn Clements <[email protected]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to