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

CPU: Optimizing the Method of Obtaining CPU Version Information #5722

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Conversation

ut003460
Copy link
Contributor

1.By using the get() method to obtain matching patterns, it avoids using try exception to capture KeyError exceptions. 2.Immediately return the result after finding the version number to avoid unnecessary iteration.
3.Use an empty string as the default return result to avoid returning None

@ut003460 ut003460 closed this Jul 12, 2023
@ut003460 ut003460 reopened this Jul 12, 2023
1.By using the get() method to obtain matching patterns, it avoids using try exception to capture KeyError exceptions.
2.Immediately return the result after finding the version number to avoid unnecessary iteration.
3.Use an empty string as the default return result to avoid returning None

Signed-off-by: ut003460 <[email protected]>
Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

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

Hi @ut003460, changes LGTM. Thank you.

@richtja richtja merged commit 179c0a8 into avocado-framework:master Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants