[GRASS-SVN] r72278 - grass/branches/releasebranch_7_4/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Feb 25 07:28:44 PST 2018
Author: mmetz
Date: 2018-02-25 07:28:44 -0800 (Sun, 25 Feb 2018)
New Revision: 72278
Modified:
grass/branches/releasebranch_7_4/lib/init/grass.py
Log:
grass startup script: fix confusing message about missing WIND file fixed (backport trunk r72277)
Modified: grass/branches/releasebranch_7_4/lib/init/grass.py
===================================================================
--- grass/branches/releasebranch_7_4/lib/init/grass.py 2018-02-25 15:21:46 UTC (rev 72277)
+++ grass/branches/releasebranch_7_4/lib/init/grass.py 2018-02-25 15:28:44 UTC (rev 72278)
@@ -930,12 +930,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