-
Notifications
You must be signed in to change notification settings - Fork 660
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
Add Exception handling when processing udev devices #5088
Conversation
Khadas VIM4 UDEV returns something that python crapps its pants about. The exception just allows it to continue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @RichardPar
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Added an exception print for the times things go bad.
@pvizeli Any help would be appreciated... IANAPD (I am not a python developer :) This was my limit without me butchering things. I just copied the exception handler from an example a few functions above - it was written exactly the same (in the same file) |
The exception is not fatal when parsing error happens on one node. print it and continue.
device.device_node function bails very badly! It raises no exceptions to the top but complains and errors
Co-authored-by: Stefan Agner <[email protected]>
WalkthroughWalkthroughThe recent update in Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant Manager
participant UdevDevice
participant Logger
Manager->>UdevDevice: Process properties
UdevDevice-->>Manager: Return property with unknown encoding
Manager->>Logger: Log warning for UnicodeDecodeError
Manager->>UdevDevice: Continue processing other devices
Assessment against linked issues
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Additional comments not posted (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Thanks @RichardPar 👍 |
Khadas VIM4 UDEV returns something that python crapps its pants about. The exception just allows it to continue.
Proposed change
Type of change
Additional information
Checklist
ruff format supervisor tests
)If API endpoints of add-on configuration are added/changed:
Summary by CodeRabbit
UnicodeDecodeError
exceptions, ensuring smoother operation and logging warning messages for better diagnostics.