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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 16 10:01:47 PDT 2013


Author: wenzeslaus
Date: 2013-06-16 10:01:47 -0700 (Sun, 16 Jun 2013)
New Revision: 56733

Modified:
   grass/trunk/lib/python/pygrass/modules/interface/parameter.py
Log:
pygrass: use keydescvalues only when defined

Modified: grass/trunk/lib/python/pygrass/modules/interface/parameter.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/parameter.py	2013-06-16 11:18:36 UTC (rev 56732)
+++ grass/trunk/lib/python/pygrass/modules/interface/parameter.py	2013-06-16 17:01:47 UTC (rev 56733)
@@ -139,7 +139,8 @@
                 vals = ', '.join([repr(val) for val in self.values])
         else:
             vals = False
-        keydescvals = "\n    (%s)" % ', '.join(self.keydescvalues)
+        if self.keydescvalues:
+            keydescvals = "\n    (%s)" % ', '.join(self.keydescvalues)
         return DOC['param'].format(name=self.name,
                 default=repr(self.default) + ', ' if self.default else '',
                 required='required, ' if self.required else 'optional, ',



More information about the grass-commit mailing list