Edit book: Fix a rare error when running the Reports tool

py3 delights again
This commit is contained in:
Kovid Goyal 2022-11-12 13:17:57 +05:30
parent 04b5e9bfc2
commit 577e550a54
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -275,7 +275,7 @@ def group_sort(locations):
for loc in locations: for loc in locations:
if loc.file_name not in order: if loc.file_name not in order:
order[loc.file_name] = len(order) order[loc.file_name] = len(order)
return sorted(locations, key=lambda l:(order[l.file_name], l.sourceline)) return sorted(locations, key=lambda l:(order[l.file_name], l.sourceline or 0))
def get_checkable_file_names(container): def get_checkable_file_names(container):