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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 2 11:10:50 EDT 2011


Author: martinl
Date: 2011-11-02 08:10:50 -0700 (Wed, 02 Nov 2011)
New Revision: 49049

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
Log:
wxGUI/modeler: check also parametrized options


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2011-11-02 14:48:55 UTC (rev 49048)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2011-11-02 15:10:50 UTC (rev 49049)
@@ -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