Browse Source

grass.py: check if GRASS is already running

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59210 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 years ago
parent
commit
744281fc95
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/init/grass.py

+ 3 - 0
lib/init/grass.py

@@ -1224,6 +1224,9 @@ windows = sys.platform == 'win32'
 cygwin = "cygwin" in sys.platform
 macosx = "darwin" in sys.platform
 
+if 'GISBASE' in os.environ:
+    sys.exit(_("ERROR: GRASS GIS seems to be already running. Exiting."))
+
 # Set GISBASE
 os.environ['GISBASE'] = gisbase