[GRASS-SVN] r34339 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Nov 17 11:56:46 EST 2008
Author: martinl
Date: 2008-11-17 11:56:46 -0500 (Mon, 17 Nov 2008)
New Revision: 34339
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py
Log:
wxGUI: fix error message --- trac #366
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py 2008-11-17 16:50:33 UTC (rev 34338)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py 2008-11-17 16:56:46 UTC (rev 34339)
@@ -448,14 +448,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