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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 16 03:04:14 PST 2013


Author: mic
Date: 2013-01-16 03:04:14 -0800 (Wed, 16 Jan 2013)
New Revision: 54666

Modified:
   grass-addons/grass7/raster/r.agent/libagent/grassland.py
Log:
minor import and bug fixes

Modified: grass-addons/grass7/raster/r.agent/libagent/grassland.py
===================================================================
--- grass-addons/grass7/raster/r.agent/libagent/grassland.py	2013-01-16 10:48:16 UTC (rev 54665)
+++ grass-addons/grass7/raster/r.agent/libagent/grassland.py	2013-01-16 11:04:14 UTC (rev 54666)
@@ -9,6 +9,7 @@
               for details.
 """
 
+import playground
 import grass.script as grass
 from grass.script import array as garray
 
@@ -45,7 +46,7 @@
         """
         if not force and self.layers.has_key(layername):
             raise error.Error("r.agent::libagent.playground.Playground()",
-                                    "May not overwrite existing layer."))
+                                    "May not overwrite existing layer.")
         self.layers[layername] = layer
     def setgrasslayer(self, layername, grassmapname, force=False):
         """
@@ -85,7 +86,7 @@
         if self.layers.has_key(layername):
             self.layers.pop(layername)
     def writelayer(self, layername, force=False):
-        if self.layers.has_key(layername) and
+        if self.layers.has_key(layername) and \
           self.grassmapnames.has_key(layername):
             grassmapname = self.grassmapnames[layername]
             layer = self.layers[layername]



More information about the grass-commit mailing list