[GRASS-SVN] r57528 - grass/trunk/lib/python/pygrass/modules/interface
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 28 06:18:52 PDT 2013
Author: zarch
Date: 2013-08-28 06:18:52 -0700 (Wed, 28 Aug 2013)
New Revision: 57528
Modified:
grass/trunk/lib/python/pygrass/modules/interface/module.py
Log:
Fix the last test using deepcopy and neighbors
Modified: grass/trunk/lib/python/pygrass/modules/interface/module.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/module.py 2013-08-28 13:12:49 UTC (rev 57527)
+++ grass/trunk/lib/python/pygrass/modules/interface/module.py 2013-08-28 13:18:52 UTC (rev 57528)
@@ -153,7 +153,7 @@
else:
self.outputs[par.name] = par
if par.required:
- self.required.append(par)
+ self.required.append(par.name)
#
# extract flags from the xml
@@ -236,10 +236,11 @@
#
# check reqire parameters
#
- for par in self.required:
- if par.value is None:
+ for key in self.required:
+ if ((key in self.inputs and self.inputs[key].value is None) or
+ (key in self.outputs and self.outputs[key].value is None)):
raise ParameterError(
- "Required parameter <%s> not set." % par.name)
+ "Required parameter <%s> not set." % key)
#
# check if execute
More information about the grass-commit
mailing list