Permalink
Browse files

use option name if displayname is missing, hopefully fixes issue #27

  • Loading branch information...
simoncadman committed Jun 2, 2013
1 parent 0697192 commit 5994f4b1355c1879c14d70f519769a906c46c319
Showing with 6 additions and 1 deletion.
  1. +6 −1 dynamicppd.py
View
@@ -113,7 +113,12 @@ def showUsage():
for option in capability['options']:
if 'default' in option and option['default'] == True:
ppddetails += '*DefaultGCP_' + capability['name'].replace(':','_') + ': ' + option['name'] + "\n"
- ppddetails += '*GCP_' + capability['name'].replace(':','_') + ' ' + option['displayName'].replace(':','_') + ':' + option['name'].replace(':','_') + '' + "\n"
+ optionName = None
+ if 'displayName' in option:
+ optionName = option['displayName']
+ else:
+ optionName = option['name']
+ ppddetails += '*GCP_' + capability['name'].replace(':','_') + ' ' + optionName.replace(':','_') + ':' + option['name'].replace(':','_') + "\n"
ppddetails += '*CloseUI: *GCP_' + capabilityName.replace(':','_') + "\n"
elif capability['type'] == 'ParameterDef':
pass

0 comments on commit 5994f4b

Please sign in to comment.