]> git.ipfire.org Git - thirdparty/systemd.git/commit
elf2efi: import whole module, not individual symbols
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Thu, 19 Feb 2026 12:32:31 +0000 (13:32 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Thu, 19 Feb 2026 14:34:10 +0000 (15:34 +0100)
commit528a939c89f600adfecc7d280a1474ff2498d72c
treeabe55121ce6b156c2a5062016d6ccd54ffe71184
parent469879aa44c4cde5541b98be0a4421ab069c5834
elf2efi: import whole module, not individual symbols

When reading the code, it was hard to figure out if the given name was
imported or a local class. And the renaming of imports also made it
harder to look things up online. Arguably, the deeply nested import
structure and inconsistent naming in elftools is partially to blame:
there is just no good way to make this look nice. But anyway, let's use
the usual style of importing the module and using names prefixed with
the module path so that the origin of imported names is clear.

elfutils.elf.elffile is importered separately, because a) it needs to be
imported separately anyway bxecause the module does lazy imports
internally, a) the name already indicates the origin, c) is used in
quite a few places so the shorter name is nice.
tools/elf2efi.py