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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 7 03:06:36 PDT 2014


Author: zarch
Date: 2014-10-07 03:06:36 -0700 (Tue, 07 Oct 2014)
New Revision: 62199

Modified:
   grass/trunk/lib/python/pygrass/gis/__init__.py
Log:
pygrass: Fix circular import dependency between gis.__init__ and functions

Modified: grass/trunk/lib/python/pygrass/gis/__init__.py
===================================================================
--- grass/trunk/lib/python/pygrass/gis/__init__.py	2014-10-07 10:05:03 UTC (rev 62198)
+++ grass/trunk/lib/python/pygrass/gis/__init__.py	2014-10-07 10:06:36 UTC (rev 62199)
@@ -11,7 +11,7 @@
 
 
 import grass.lib.gis as libgis
-from grass.pygrass.functions import getenv
+libgis.G_gisinit('')
 from grass.pygrass.errors import GrassError
 
 
@@ -55,6 +55,7 @@
     if value and CHECK_IS[type](join(path, value)):
         return value
     elif value is '':
+        from grass.pygrass.functions import getenv
         return getenv(type)
     else:
         raise GrassError("%s <%s> not found" % (type.title(),



More information about the grass-commit mailing list