[GRASS-SVN] r54653 - grass-addons/grass7/raster/r.agent/libagent

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 15 15:12:42 PST 2013


Author: mic
Date: 2013-01-15 15:12:42 -0800 (Tue, 15 Jan 2013)
New Revision: 54653

Modified:
   grass-addons/grass7/raster/r.agent/libagent/grassland.py
Log:
get layer by name out of the list

Modified: grass-addons/grass7/raster/r.agent/libagent/grassland.py
===================================================================
--- grass-addons/grass7/raster/r.agent/libagent/grassland.py	2013-01-15 23:09:11 UTC (rev 54652)
+++ grass-addons/grass7/raster/r.agent/libagent/grassland.py	2013-01-15 23:12:42 UTC (rev 54653)
@@ -72,7 +72,10 @@
         @param string name of the layer
         @return list the requested map layer
         """
-        return []
+        retval = False
+        if self.layers.has_key(layername):
+            retval = self.layers[layername]
+        return retval
     def removelayer(self, layername):
         """
         Remove (forget about) the layer named from the layer collection



More information about the grass-commit mailing list