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

Fix FileNotFound exception in mtk reset #942

Merged
merged 2 commits into from
May 12, 2024
Merged

Conversation

9cb14c1ec0
Copy link
Contributor

If logs don't exist for some reason, we don't need to trip up when deleting them, which prevents proper device shutdown.

If logs don't exist for some reason, we don't need to trip up when deleting them, which prevents proper device shutdown.
Copy link
Owner

@bkerler bkerler left a comment

Choose a reason for hiding this comment

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

I don't think that a try except block is a good solution to that.
I'd recommend to do this instead :

if os.path.exists(os.path.join("logs", "hwparam.json")):
    os.remove(os.path.join("logs", "hwparam.json"))

@9cb14c1ec0
Copy link
Contributor Author

Ok, I changed it.

@bkerler bkerler merged commit df9e179 into bkerler:main May 12, 2024
1 check passed
@bkerler
Copy link
Owner

bkerler commented May 12, 2024

Thx, merged :)

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.

2 participants