Skip to content

Commit e3cab79

Browse files
committed
Sort the about object by name before passing the jinja2
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 6a480ce commit e3cab79

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/attributecode/attrib.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ def generate(abouts, is_about_input, license_dict, scancode, min_license_score,
165165
# Add the license name expression string into the about object as a list
166166
about.license_name_expression = lic_name_expression
167167

168+
# Sort the about objects by name
169+
abouts = sorted(abouts, key=lambda x: x.name.value.lower())
170+
168171
# Sort the license object by key
169172
licenses_list = sorted(licenses_list, key=lambda x: x.key)
170173

0 commit comments

Comments
 (0)