فهرست منبع

grass.py: check if location path exists

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47019 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 سال پیش
والد
کامیت
e41f6e01b7
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      lib/init/grass.py

+ 3 - 0
lib/init/grass.py

@@ -581,6 +581,9 @@ def load_gisrc():
 
 def check_lock():
     global lockfile
+    if not os.path.exists(location):
+        fatal(_("Path '%s' doesn't exist") % location)
+    
     # Check for concurrent use
     lockfile = os.path.join(location, ".gislock")
     ret = call([gfile("etc", "lock"),