Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sof_perf_analyzer: fix exception when kernel message not provided #1113

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

aiChaoSONG
Copy link

If kernel message file is not provided, the component_name dict will be empty, in calculating the maximum length of component names, we calls the max function with an empty sequence, which raises below error:
"ValueError: max() arg is an empty sequence"

This patch checks if component_name dict is empty, and on empty, provides a default value.

@aiChaoSONG aiChaoSONG requested a review from a team as a code owner October 11, 2023 09:14
tools/sof_perf_analyzer.py Outdated Show resolved Hide resolved
If kernel message file is not provided, the component_name
dict will be empty, in calculating the maximum length of
component names, we calls the max function with an empty
sequence, which raises below error:
    "ValueError: max() arg is an empty sequence"

This patch checks if component_name dict is empty, and on
empty, provides a default value.

Signed-off-by: Chao Song <[email protected]>
@marc-hb
Copy link
Collaborator

marc-hb commented Oct 13, 2023

SOFCI TEST

@marc-hb marc-hb merged commit 519361d into thesofproject:main Oct 13, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants