[GRASS-SVN] r42909 - grass/trunk/scripts/v.krige

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 27 06:09:47 EDT 2010


Author: neteler
Date: 2010-07-27 10:09:47 +0000 (Tue, 27 Jul 2010)
New Revision: 42909

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

Modified: grass/trunk/scripts/v.krige/v.krige.py
===================================================================
--- grass/trunk/scripts/v.krige/v.krige.py	2010-07-27 09:47:09 UTC (rev 42908)
+++ grass/trunk/scripts/v.krige/v.krige.py	2010-07-27 10:09:47 UTC (rev 42909)
@@ -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", "gui", "wxpython", "gui_modules")
 sys.path.append(GUIModulesPath)
 



More information about the grass-commit mailing list