[GRASS-SVN] r42910 - grass/branches/develbranch_6/scripts/v.krige

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 27 06:10:24 EDT 2010


Author: neteler
Date: 2010-07-27 10:10:24 +0000 (Tue, 27 Jul 2010)
New Revision: 42910

Modified:
   grass/branches/develbranch_6/scripts/v.krige/v.krige.py
Log:
check if run in a GRASS session

Modified: grass/branches/develbranch_6/scripts/v.krige/v.krige.py
===================================================================
--- grass/branches/develbranch_6/scripts/v.krige/v.krige.py	2010-07-27 10:09:47 UTC (rev 42909)
+++ grass/branches/develbranch_6/scripts/v.krige/v.krige.py	2010-07-27 10:10:24 UTC (rev 42910)
@@ -104,6 +104,10 @@
 import time
 import thread
 
+if not os.environ.has_key("GISBASE"):
+    print "You must be in GRASS GIS to run this program."
+    sys.exit(1)
+
 GUIModulesPath = os.path.join(os.getenv("GISBASE"), "etc", "wxpython", "gui_modules")
 sys.path.append(GUIModulesPath)
 



More information about the grass-commit mailing list