[GRASS-SVN] r60881 - grass/trunk/lib/python/pygrass/modules/interface
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jun 20 01:25:30 PDT 2014
Author: zarch
Date: 2014-06-20 01:25:30 -0700 (Fri, 20 Jun 2014)
New Revision: 60881
Modified:
grass/trunk/lib/python/pygrass/modules/interface/parameter.py
Log:
Handle missing prompt key in gisprompt
Modified: grass/trunk/lib/python/pygrass/modules/interface/parameter.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/parameter.py 2014-06-20 07:33:09 UTC (rev 60880)
+++ grass/trunk/lib/python/pygrass/modules/interface/parameter.py 2014-06-20 08:25:30 UTC (rev 60881)
@@ -15,7 +15,7 @@
# TODO add documentation
class Parameter(object):
"""The Parameter object store all information about a parameter of module.
-
+
It is possible to set parameter of command using this object.
"""
def __init__(self, xparameter=None, diz=None):
@@ -83,7 +83,7 @@
# gisprompt
#
if 'gisprompt' in diz:
- self.typedesc = diz['gisprompt']['prompt']
+ self.typedesc = diz['gisprompt'].get('prompt', '')
self.input = False if diz['gisprompt']['age'] == 'new' else True
else:
self.input = True
More information about the grass-commit
mailing list