[GRASS-SVN] r54769 - grass/trunk/lib/python/pygrass/modules

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 25 06:53:30 PST 2013


Author: zarch
Date: 2013-01-25 06:53:29 -0800 (Fri, 25 Jan 2013)
New Revision: 54769

Modified:
   grass/trunk/lib/python/pygrass/modules/__init__.py
Log:
Fix multi values parameters

Modified: grass/trunk/lib/python/pygrass/modules/__init__.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/__init__.py	2013-01-25 13:24:13 UTC (rev 54768)
+++ grass/trunk/lib/python/pygrass/modules/__init__.py	2013-01-25 14:53:29 UTC (rev 54769)
@@ -193,8 +193,7 @@
         if isinstance(value, list) or isinstance(value, tuple):
             if self.multiple:
                 # check each value
-                self._value = [
-                    val for val in value if isinstance(value, self._type)]
+                self._value = [self._type(val) for val in value]
             else:
                 str_err = 'The Parameter <%s> does not accept multiple inputs'
                 raise TypeError(str_err % self.name)



More information about the grass-commit mailing list