[GRASS-SVN] r73343 - grass/trunk/lib/python/pygrass

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 15 20:46:50 PDT 2018


Author: annakrat
Date: 2018-09-15 20:46:50 -0700 (Sat, 15 Sep 2018)
New Revision: 73343

Modified:
   grass/trunk/lib/python/pygrass/utils.py
Log:
pygrass: we need to return unicode

Modified: grass/trunk/lib/python/pygrass/utils.py
===================================================================
--- grass/trunk/lib/python/pygrass/utils.py	2018-09-16 03:46:04 UTC (rev 73342)
+++ grass/trunk/lib/python/pygrass/utils.py	2018-09-16 03:46:50 UTC (rev 73343)
@@ -8,6 +8,7 @@
 libgis.G_gisinit('')
 import grass.lib.raster as libraster
 from grass.script import core as grasscore
+from grass.script import utils as grassutils
 
 from grass.pygrass.errors import GrassError
 
@@ -124,7 +125,7 @@
     True
 
     """
-    return libgis.G_getenv_nofatal(env)
+    return grassutils.decode(libgis.G_getenv_nofatal(env))
 
 
 def get_mapset_raster(mapname, mapset=''):
@@ -134,7 +135,7 @@
     True
 
     """
-    return libgis.G_find_raster2(mapname, mapset)
+    return grassutils.decode(libgis.G_find_raster2(mapname, mapset))
 
 
 def get_mapset_vector(mapname, mapset=''):
@@ -144,7 +145,7 @@
     True
 
     """
-    return libgis.G_find_vector2(mapname, mapset)
+    return grassutils.decode(libgis.G_find_vector2(mapname, mapset))
 
 
 def is_clean_name(name):



More information about the grass-commit mailing list