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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jul 22 03:56:40 EDT 2011


Author: martinl
Date: 2011-07-22 00:56:40 -0700 (Fri, 22 Jul 2011)
New Revision: 47222

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py
Log:
wxGUI: show reason why rendering failed


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py	2011-07-22 07:46:59 UTC (rev 47221)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py	2011-07-22 07:56:40 UTC (rev 47222)
@@ -926,17 +926,18 @@
         
         if maps:
             # run g.pngcomp to get composite image
-            ret = gcmd.RunCommand('g.pnmcomp',
-                                  input = '%s' % ",".join(maps),
-                                  mask = '%s' % ",".join(masks),
-                                  opacity = '%s' % ",".join(opacities),
-                                  background = bgcolor,
-                                  width = self.width,
-                                  height = self.height,
-                                  output = self.mapfile)
+            ret, msg = gcmd.RunCommand('g.pnmcomp',
+                                       getErrorMsg = True,
+                                       input = '%s' % ",".join(maps),
+                                       mask = '%s' % ",".join(masks),
+                                       opacity = '%s' % ",".join(opacities),
+                                       background = bgcolor,
+                                       width = self.width,
+                                       height = self.height,
+                                       output = self.mapfile)
             
             if ret != 0:
-                print >> sys.stderr, _("ERROR: Rendering failed")
+                print >> sys.stderr, _("ERROR: Rendering failed. Details: %s") % msg
                 return None
             
             Debug.msg (3, "Map.Render() force=%s file=%s" % (force, self.mapfile))



More information about the grass-commit mailing list