[GRASS-SVN] r57326 - grass/trunk/lib/python/pygrass/modules/interface
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jul 30 08:31:19 PDT 2013
Author: zarch
Date: 2013-07-30 08:31:19 -0700 (Tue, 30 Jul 2013)
New Revision: 57326
Modified:
grass/trunk/lib/python/pygrass/modules/interface/parameter.py
Log:
Allow to reset a parameter with None
Modified: grass/trunk/lib/python/pygrass/modules/interface/parameter.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/parameter.py 2013-07-29 21:21:23 UTC (rev 57325)
+++ grass/trunk/lib/python/pygrass/modules/interface/parameter.py 2013-07-30 15:31:19 UTC (rev 57326)
@@ -79,7 +79,9 @@
return self._value
def _set_value(self, value):
- if isinstance(value, list) or isinstance(value, tuple):
+ if value is None:
+ self._value = value
+ elif isinstance(value, list) or isinstance(value, tuple):
if self.multiple or self.keydescvalues:
# check each value
self._value = [self.type(val) for val in value]
More information about the grass-commit
mailing list