[GRASS-SVN] r49051 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 2 11:12:22 EDT 2011


Author: martinl
Date: 2011-11-02 08:12:21 -0700 (Wed, 02 Nov 2011)
New Revision: 49051

Modified:
   grass/trunk/gui/wxpython/gui_modules/gmodeler.py
Log:
wxGUI/modeler: check also parametrized options
	       (merge r49049 from devbr6)


Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2011-11-02 15:11:19 UTC (rev 49050)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2011-11-02 15:12:21 UTC (rev 49051)
@@ -572,6 +572,17 @@
                 GError(parent = parent, message = unicode('\n'.join(err)))
                 return
         
+            err = list()
+            for key, item in params.iteritems():
+                for p in item['params']:
+                    if p.get('value', '') == '':
+                        err.append((key, p.get('name', ''), p.get('description', '')))
+            if err:
+                GError(parent = parent,
+                       message = _("Variables below not defined:") + \
+                           "\n\n" + unicode('\n'.join(map(lambda x: "%s: %s (%s)" % (x[0], x[1], x[2]), err))))
+                return
+        
         log.cmdThread.SetId(-1)
         for item in self.GetItems():
             if not item.IsEnabled():



More information about the grass-commit mailing list