[GRASS-SVN] r54650 - grass-addons/grass7/raster/r.agent/libagent
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 15 14:56:37 PST 2013
Author: mic
Date: 2013-01-15 14:56:36 -0800 (Tue, 15 Jan 2013)
New Revision: 54650
Modified:
grass-addons/grass7/raster/r.agent/libagent/grassland.py
Log:
add a layer to the grass-playground
Modified: grass-addons/grass7/raster/r.agent/libagent/grassland.py
===================================================================
--- grass-addons/grass7/raster/r.agent/libagent/grassland.py 2013-01-15 16:50:00 UTC (rev 54649)
+++ grass-addons/grass7/raster/r.agent/libagent/grassland.py 2013-01-15 22:56:36 UTC (rev 54650)
@@ -42,7 +42,10 @@
@param list a map layer
@param boolean optional, whether to overwrite values if key exists
"""
- pass
+ if not force and self.layers.has_key(layername):
+ raise error.Error("r.agent::libagent.playground.Playground()",
+ "May not overwrite existing layer."))
+ self.layers[layername] = layer
def setgrasslayer(self, layername, grassmapname, force=False):
"""
Put an existing map from GRASS to the layer collection
More information about the grass-commit
mailing list