[GRASS-SVN] r47521 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 9 20:02:55 EDT 2011


Author: martinl
Date: 2011-08-09 17:02:55 -0700 (Tue, 09 Aug 2011)
New Revision: 47521

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gcmd.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py
Log:
wxGUI: be more verbose about errors in rendering
       (merge r47520 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gcmd.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gcmd.py	2011-08-09 23:59:06 UTC (rev 47520)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gcmd.py	2011-08-10 00:02:55 UTC (rev 47521)
@@ -103,7 +103,7 @@
                       style = style)
 
 class GException(Exception):
-    def __init__(self, value):
+    def __init__(self, value = ''):
         self.value = value
 
     def __str__(self):

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py	2011-08-09 23:59:06 UTC (rev 47520)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py	2011-08-10 00:02:55 UTC (rev 47521)
@@ -184,12 +184,13 @@
                                            quiet = True,
                                            **self.cmd[1])
             
+            if msg:
+                sys.stderr.write(_("Command '%s' failed\n") % self.GetCmd(string = True))
+                sys.stderr.write(_("Details: %s\n") % msg)
             if ret != 0:
-                raise gcmd.GException(value = _("'%(cmd)s' failed. Details: %(det)s") % \
-                                          { 'cmd' : self.cmd[0], 'det' : msg })
+                raise gcmd.GException()
         
-        except gcmd.GException, e:
-            print >> sys.stderr, e.value
+        except gcmd.GException:
             # clean up after problems
             try:
                 os.remove(self.mapfile)



More information about the grass-commit mailing list