Glynn Clements wrote: > > 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. > All that i.landsat.rgb does is creating color rules. They are stored in /colr2 if the input maps are not in the current mapset. As r.colors does not modify the raster history, and i.landsat.rgb is just a front-end for r.colors, one could argue that i.landsta.rgb should not touch raster history as well.
my2c Markus M > 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 <gl...@gclements.plus.com> > _______________________________________________ > grass-dev mailing list > grass-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-dev > _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev