Closed bluca closed 6 months ago
I pushed another commit to rework the output to have more postprocessing.
I pushed another commit to rework the output to have more postprocessing.
Merged into the first commit with Co-authored-by - also added CI, and added back a way to print a "soname priority" list, that I need for the Debian tool, behind a new option
I have no idea why it errors out in the CI, the string seems fine... also works locally, any idea?
The bit
[{"feature":"fido2","description":"Support fido2 for encryption and authentication.","priority":"required","soname":["libfido2.so.1"]}]
in the output makes me think that the else path here
try:
if not isinstance(note_desc, str):
text = note_desc.decode('utf-8').rstrip('\0')
else:
text = note_desc
print(text)
except UnicodeDecodeError as e:
raise ValueError(f'{filename}: Invalid UTF-8 in .note.dlopen n_desc') from e
is taken, but when I copy the above JSON into Emacs, it has a trailing null byte, which gives me the same error
json.decoder.JSONDecodeError: Extra data: line 1 column 136 (char 135)
Yes, unfortunately strings in Python can have null bytes, so stripping that might be what's needed.
Indeed stripping that side of the if fixes the issue, thanks
Spec and implementation at https://github.com/systemd/systemd/pull/32234