[GRASS-SVN] r72318 - grass/branches/releasebranch_7_4/lib/python/pygrass/raster

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 3 04:20:13 PST 2018


Author: marisn
Date: 2018-03-03 04:20:13 -0800 (Sat, 03 Mar 2018)
New Revision: 72318

Modified:
   grass/branches/releasebranch_7_4/lib/python/pygrass/raster/abstract.py
Log:
PyGRASS: Category.__init__ expects map name to be provided (r72227 backport)


Modified: grass/branches/releasebranch_7_4/lib/python/pygrass/raster/abstract.py
===================================================================
--- grass/branches/releasebranch_7_4/lib/python/pygrass/raster/abstract.py	2018-03-03 12:15:41 UTC (rev 72317)
+++ grass/branches/releasebranch_7_4/lib/python/pygrass/raster/abstract.py	2018-03-03 12:20:13 UTC (rev 72318)
@@ -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