Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ def remove_old_entries(gens: List[Tuple[Optional[str], int]]) -> None:
else:
prof = "system"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we than not just set this to None?

Suggested change
prof = "system"
prof = None

gen_number = int(rex_generation.sub(r"\1", path))
if not (prof, gen_number) in gens:
profile = prof if prof != "system" else None
if not (profile, gen_number) in gens:
os.unlink(path)
except ValueError:
pass
Expand Down Expand Up @@ -241,7 +242,7 @@ def main() -> None:
if os.readlink(system_dir(*gen)) == args.default_config:
write_loader_conf(*gen)
except OSError as e:
print("ignoring profile '{}' in the list of boot entries because of the following error:\n{}".format(profile, e), file=sys.stderr)
print("ignoring profile '{}' in the list of boot entries because of the following error:\n{}".format(gen[0] if gen[0] else "system", e), file=sys.stderr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
print("ignoring profile '{}' in the list of boot entries because of the following error:\n{}".format(gen[0] if gen[0] else "system", e), file=sys.stderr)
profile = gen[0] or "system"
print("ignoring profile '{}' in the list of boot entries because of the following error:\n{}".format(profile, e), file=sys.stderr)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to #155054


memtest_entry_file = "@efiSysMountPoint@/loader/entries/memtest86.conf"
if os.path.exists(memtest_entry_file):
Expand Down