The perf sample dso_bid getter returns a string or None, matching its
Optional[str] annotation. Attempting to decode it as bytes causes mypy
to report union-attr errors, even though this was behind a conditional
that checked for bytes type.
Use the string directly, retaining the fallback for an unknown build ID.
This fixes the following build error:
python/arm-cs-trace-disasm.py:266: error: Item "None" of "str | None" has no attribute "decode" [union-attr]
Fixes: 279b402e51 ("perf python: Port arm-cs-trace-disasm to perf module")
Reviewed-by: Leo Yan <[email protected]>
Reviewed-by: Ian Rogers <[email protected]>
Assisted-by: Codex:GPT-6-Astra
Signed-off-by: James Clark <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>