[GRASS-SVN] r42577 - grass/trunk/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jun 17 12:03:09 EDT 2010
Author: martinl
Date: 2010-06-17 16:03:09 +0000 (Thu, 17 Jun 2010)
New Revision: 42577
Modified:
grass/trunk/lib/python/core.py
Log:
libpython: don't run g.gisenv if not available (during compilation)
(merge r42576 from trunk)
Modified: grass/trunk/lib/python/core.py
===================================================================
--- grass/trunk/lib/python/core.py 2010-06-17 16:01:11 UTC (rev 42576)
+++ grass/trunk/lib/python/core.py 2010-06-17 16:03:09 UTC (rev 42577)
@@ -505,8 +505,6 @@
s = read_command("g.gisenv", flags='n')
return parse_key_val(s)
-debug_level = int(gisenv().get('DEBUG', 0))
-
# interface to g.region
def region():
@@ -863,3 +861,7 @@
cmdinfo['parameters'] = dict
return cmdinfo
+
+# get debug_level
+if find_program('g.gisenv', ['--help']):
+ debug_level = int(gisenv().get('DEBUG', 0))
More information about the grass-commit
mailing list