@@ -124,13 +124,13 @@ def generate(abouts, template=None, variables=None):
124124 # Map the license key to license name
125125 index_for_license_name_list = 0
126126 for key in lic_list :
127- license_key_and_license_file_name [key ] = about .license_file .value .keys ()[index_for_license_name_list ]
127+ license_key_and_license_file_name [key ] = list ( about .license_file .value .keys () )[index_for_license_name_list ]
128128 license_key_and_license_name [key ] = lic_name_list [index_for_license_name_list ]
129129 license_name_and_license_key [lic_name_list [index_for_license_name_list ]] = key
130130 license_file_key = license_file_name_and_license_file_key [license_key_and_license_file_name [key ]]
131131 license_file_key_and_license_key [license_file_key ] = key
132132 index_for_license_name_list = index_for_license_name_list + 1
133-
133+
134134 # Create a license expression with license name instead of key
135135 for segment in about .license_expression .value .split ():
136136 if segment in license_key_and_license_name :
@@ -163,9 +163,13 @@ def generate(abouts, template=None, variables=None):
163163 if lineno :
164164 lineno = ' at line: {}' .format (lineno )
165165 err = getattr (e , 'message' , '' ) or ''
166+ # error = Error(
167+ # CRITICAL,
168+ # 'Template processing error {lineno}: {err}'.format(**locals()),
169+ # )
166170 error = Error (
167171 CRITICAL ,
168- 'Template processing error {lineno}: {err}' . format ( ** locals () ),
172+ 'Template processing error:' + str ( e ),
169173 )
170174 return error , rendered
171175
@@ -232,6 +236,9 @@ def generate_and_save(abouts, output_location, template_loc=None, variables=None
232236 variables = variables
233237 )
234238
239+ print ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" )
240+ print (rendering_error )
241+ print (rendered )
235242 if rendering_error :
236243 errors .append (rendering_error )
237244
0 commit comments