[GRASS-SVN] r42578 - grass/branches/releasebranch_6_4/lib/python

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 17 12:03:44 EDT 2010


Author: martinl
Date: 2010-06-17 16:03:44 +0000 (Thu, 17 Jun 2010)
New Revision: 42578

Modified:
   grass/branches/releasebranch_6_4/lib/python/core.py
Log:
libpython: don't run g.gisenv if not available (during compilation)
(merge r42576 from trunk)


Modified: grass/branches/releasebranch_6_4/lib/python/core.py
===================================================================
--- grass/branches/releasebranch_6_4/lib/python/core.py	2010-06-17 16:03:09 UTC (rev 42577)
+++ grass/branches/releasebranch_6_4/lib/python/core.py	2010-06-17 16:03:44 UTC (rev 42578)
@@ -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