Codebase list ctdconverter / 596de19
Merge pull request #19 from blankclemens/master Always add whitespace_validation to _Choices chahuistle authored 7 years ago GitHub committed 7 years ago
1 changed file(s) with 8 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
809809 ## not useful for choices, input fields ...
810810
811811 if not is_boolean_parameter(param) and type(param.restrictions) is _Choices :
812 # if default value is present in select list, no need to check for whitespaces
813 if is_selection_parameter(param) and param.default in param.restrictions.choices:
814 command += "#if " + actual_parameter + ":\n"
815 command += ' %s %s\n' % (param_cli_name, actual_parameter)
816 command += "#end if\n"
817 else:
818 command += "#if " + actual_parameter + ":\n"
819 command += ' %s\n' % param_cli_name
820 command += " #if \" \" in str(" + actual_parameter + "):\n"
821 command += " \"" + actual_parameter + "\"\n"
822 command += " #else\n"
823 command += " " + actual_parameter + "\n"
824 command += " #end if\n"
825 command += "#end if\n"
812 command += "#if " + actual_parameter + ":\n"
813 command += ' %s\n' % param_cli_name
814 command += " #if \" \" in str(" + actual_parameter + "):\n"
815 command += " \"" + actual_parameter + "\"\n"
816 command += " #else\n"
817 command += " " + actual_parameter + "\n"
818 command += " #end if\n"
819 command += "#end if\n"
826820 elif is_boolean_parameter(param):
827821 command += "#if " + actual_parameter + ":\n"
828822 command += ' %s\n' % param_cli_name