zigpy / bellows

A Python 3 project to implement EZSP for EmberZNet devices
GNU General Public License v3.0
179 stars 87 forks source link

Prevent the UART thread from propagating `CancelledError` #524

Closed puddly closed 1 year ago

puddly commented 1 year ago

Fix for https://github.com/home-assistant/core/issues/86800

This does not fix the underlying problem with the multi-PAN addon causing the startup connection failure, but it will prevent the connection failure from propagating an unexpected CancelledError from the closing UART thread event loop into the "real" event loop, effectively shutting it down.

codecov-commenter commented 1 year ago

Codecov Report

Base: 99.80% // Head: 99.80% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (ff113b9) compared to base (2aa213e). Patch coverage: 100.00% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #524 +/- ## ======================================= Coverage 99.80% 99.80% ======================================= Files 51 51 Lines 4170 4176 +6 ======================================= + Hits 4162 4168 +6 Misses 8 8 ``` | [Impacted Files](https://codecov.io/gh/zigpy/bellows/pull/524?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy) | Coverage Δ | | |---|---|---| | [bellows/uart.py](https://codecov.io/gh/zigpy/bellows/pull/524?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy91YXJ0LnB5) | `100.00% <100.00%> (ø)` | | | [bellows/zigbee/application.py](https://codecov.io/gh/zigpy/bellows/pull/524?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy96aWdiZWUvYXBwbGljYXRpb24ucHk=) | `100.00% <0.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.