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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jul 19 08:31:07 PDT 2015


Author: annakrat
Date: 2015-07-19 08:31:07 -0700 (Sun, 19 Jul 2015)
New Revision: 65630

Modified:
   grass/trunk/lib/python/pygrass/modules/interface/module.py
Log:
pygrass: include in command also parameters with value equal 0

Modified: grass/trunk/lib/python/pygrass/modules/interface/module.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/module.py	2015-07-19 15:28:07 UTC (rev 65629)
+++ grass/trunk/lib/python/pygrass/modules/interface/module.py	2015-07-19 15:31:07 UTC (rev 65630)
@@ -667,10 +667,10 @@
         skip = ['stdin', 'stdout', 'stderr']
         args = [self.name, ]
         for key in self.inputs:
-            if key not in skip and self.inputs[key].value:
+            if key not in skip and self.inputs[key].value is not None and self.inputs[key].value != '':
                 args.append(self.inputs[key].get_bash())
         for key in self.outputs:
-            if key not in skip and self.outputs[key].value:
+            if key not in skip and self.outputs[key].value is not None and self.outputs[key].value != '':
                 args.append(self.outputs[key].get_bash())
         for flg in self.flags:
             if self.flags[flg].value:



More information about the grass-commit mailing list