-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Review AndroidTV decorator exception management #114133
Conversation
Hey there @JeffLIrion, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
fb5c941
to
77dffd4
Compare
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.
Looks good, thanks for the edits.
Thanks @ollo69!
Any chance for this PR to be merged? Looks like it was forgotten... |
# An unforeseen exception occurred. Close the ADB connection so that | ||
# it doesn't happen over and over again, then raise the exception. | ||
# it doesn't happen over and over again. | ||
_LOGGER.error( |
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.
Is this going to log over and over?
https://developers.home-assistant.io/docs/integration_quality_scale_index?_highlight=quality#silver-
Handles internet unavailable. Log a warning once when unavailable, log once when reconnected.
Handles device/service unavailable. Log a warning once when unavailable, log once when reconnected.
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.
I added a check if available before logging, this should avoid to repeat error log.
2f4a256
to
62d6004
Compare
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.
Thanks @ollo69
Proposed change
This PR is to fix issue in AndroidTV test in PR #113957.
Because class
entity
at line 952 catch anyException
on update and stop actions, the entity status is never set to unavailable and the exception is not raised as result of update.Not sure if this is the right way, I review the decorator to manage in the same way any kind of exception.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: