[GRASS-SVN] r34340 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Nov 17 12:00:13 EST 2008
Author: martinl
Date: 2008-11-17 12:00:13 -0500 (Mon, 17 Nov 2008)
New Revision: 34340
Modified:
grass/trunk/gui/wxpython/gui_modules/render.py
Log:
wxGUI: fix error message --- trac #366
(merge from devbr6, r34339)
Modified: grass/trunk/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/render.py 2008-11-17 16:56:46 UTC (rev 34339)
+++ grass/trunk/gui/wxpython/gui_modules/render.py 2008-11-17 17:00:13 UTC (rev 34340)
@@ -438,14 +438,16 @@
def GetWindow(self):
"""Read WIND file and set up self.wind dictionary"""
# FIXME: duplicated region WIND == g.region (at least some values)
- windfile = os.path.join (self.env['GISDBASE'],
+ filename = os.path.join (self.env['GISDBASE'],
self.env['LOCATION_NAME'],
self.env['MAPSET'],
"WIND")
try:
- windfile = open (windfile, "r")
- except StandardError, e:
- sys.stderr.write("%s %<s>: %s" % (_("Unable to open file"), windfile, e))
+ windfile = open (filename, "r")
+ except IOError, e:
+ sys.stderr.write("%s: %s <%s>: %s\n%s\n" % (_("Error"), _("Unable to open file"),
+ filename, e,
+ _("wxGUI closed.")))
sys.exit(1)
for line in windfile.readlines():
More information about the grass-commit
mailing list