[GRASS-SVN] r44710 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Dec 24 07:14:05 EST 2010
Author: martinl
Date: 2010-12-24 04:14:05 -0800 (Fri, 24 Dec 2010)
New Revision: 44710
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: track error when getting interface description
(merge r44708 from trunk)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py 2010-12-24 12:12:55 UTC (rev 44709)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py 2010-12-24 12:14:05 UTC (rev 44710)
@@ -1946,13 +1946,15 @@
@param cmd command (name of GRASS module)
"""
- nuldev = file(os.devnull, 'w+')
try:
- cmdout = grass.Popen([cmd, '--interface-description'], stdout = grass.PIPE,
- stderr = nuldev).communicate()[0]
- except OSError:
- raise gcmd.GException, _("Unable to fetch interface description for command '%s'.") % cmd
- nuldev.close()
+ cmdout, cmderr = grass.Popen([cmd, '--interface-description'], stdout = grass.PIPE,
+ stderr = grass.PIPE).communicate()
+ except OSError, e:
+ raise gcmd.GException, _("Unable to fetch interface description for command '%s'. "
+ "Details: %s") % (cmd, repr(e))
+ if cmderr:
+ raise gcmd.GException, _("Unable to fetch interface description for command '%s'. "
+ "Details: %s") % (cmd, cmderr)
return cmdout.replace('grass-interface.dtd', os.path.join(globalvar.ETCDIR, 'grass-interface.dtd'))
More information about the grass-commit
mailing list