[GRASS-SVN] r72227 - grass/trunk/lib/python/pygrass/raster

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 11 04:43:21 PST 2018


Author: marisn
Date: 2018-02-11 04:43:20 -0800 (Sun, 11 Feb 2018)
New Revision: 72227

Modified:
   grass/trunk/lib/python/pygrass/raster/abstract.py
Log:
PyGRASS: Category.__init__ expects map name to be provided


Modified: grass/trunk/lib/python/pygrass/raster/abstract.py
===================================================================
--- grass/trunk/lib/python/pygrass/raster/abstract.py	2018-02-10 15:33:11 UTC (rev 72226)
+++ grass/trunk/lib/python/pygrass/raster/abstract.py	2018-02-11 12:43:20 UTC (rev 72227)
@@ -533,8 +533,8 @@
     @must_be_open
     def get_cats(self):
         """Return a category object"""
-        cat = Category()
-        cat.read(self)
+        cat = Category(name=self.name, mapset=self.mapset)
+        cat.read()
         return cat
 
     @must_be_open



More information about the grass-commit mailing list