[GRASS-SVN] r74383 - grass/trunk/lib/python/pygrass/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 16 06:32:28 PDT 2019


Author: annakrat
Date: 2019-04-16 06:32:28 -0700 (Tue, 16 Apr 2019)
New Revision: 74383

Modified:
   grass/trunk/lib/python/pygrass/gis/__init__.py
Log:
pygrass: use getenv from utils to decode bytes, see #3811

Modified: grass/trunk/lib/python/pygrass/gis/__init__.py
===================================================================
--- grass/trunk/lib/python/pygrass/gis/__init__.py	2019-04-16 13:30:36 UTC (rev 74382)
+++ grass/trunk/lib/python/pygrass/gis/__init__.py	2019-04-16 13:32:28 UTC (rev 74383)
@@ -12,7 +12,7 @@
 
 import grass.lib.gis as libgis
 from grass.pygrass.errors import GrassError
-from grass.script.utils import encode, decode
+from grass.script.utils import encode, decode, getenv
 
 test_vector_name = "Gis_test_vector"
 test_raster_name = "Gis_test_raster"
@@ -369,9 +369,9 @@
 
     def is_current(self):
         """Check if the MAPSET is the working MAPSET"""
-        return (self.name == libgis.G_getenv('MAPSET') and
-                self.location == libgis.G_getenv('LOCATION_NAME') and
-                self.gisdbase == libgis.G_getenv('GISDBASE'))
+        return (self.name == getenv('MAPSET') and
+                self.location == getenv('LOCATION_NAME') and
+                self.gisdbase == getenv('GISDBASE'))
 
     def current(self):
         """Set the mapset as current"""



More information about the grass-commit mailing list