[GRASS-SVN] r72277 - grass/trunk/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Feb 25 07:21:46 PST 2018
Author: mmetz
Date: 2018-02-25 07:21:46 -0800 (Sun, 25 Feb 2018)
New Revision: 72277
Modified:
grass/trunk/lib/init/grass.py
Log:
grass startup script: fix confusing message about missing WIND file fixed
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2018-02-24 21:45:28 UTC (rev 72276)
+++ grass/trunk/lib/init/grass.py 2018-02-25 15:21:46 UTC (rev 72277)
@@ -946,12 +946,14 @@
else:
# 'location_name' is a valid GRASS location,
# create new mapset
- os.mkdir(location)
+ if os.path.exists(location):
+ warning(_("Missing WIND file"))
+ else:
+ os.mkdir(location)
# copy PERMANENT/DEFAULT_WIND to <mapset>/WIND
s = readfile(os.path.join(gisdbase, location_name,
"PERMANENT", "DEFAULT_WIND"))
writefile(os.path.join(location, "WIND"), s)
- message(_("Missing WIND file fixed"))
if os.access(gisrc, os.R_OK):
kv = read_gisrc(gisrc)
More information about the grass-commit
mailing list