jabesq-org / pyatmo

Simple API to access Netatmo weather station data from any python script (for Netatmo information, see www.netatmo.com)
MIT License
27 stars 29 forks source link

catch camera url update timeout #506

Closed adriencog closed 3 months ago

adriencog commented 3 months ago

On my NOC module, I'm experiencing timeout for local url. It makes whole home update throw.

Client already catches connectivity error, but timeout wasn't part of them.

Summary by Sourcery

Catch timeout errors in the camera URL update process to improve error handling and prevent disruptions in the home update process.

Bug Fixes:

sourcery-ai[bot] commented 3 months ago

Reviewer's Guide by Sourcery

This pull request addresses a timeout issue in the NOC module by extending the exception handling in the async_update_camera_urls method. The change allows the method to catch TimeoutError in addition to the existing ClientConnectorError, preventing the whole home update from failing due to local URL timeouts.

File-Level Changes

Change Details Files
Extended exception handling to include TimeoutError
  • Added TimeoutError to the list of caught exceptions
  • Maintained existing handling for ClientConnectorError
src/pyatmo/modules/module.py

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
adriencog commented 2 months ago

hi @cgtobi do you think it could be possible to create a 8.10.1 release with this fix ? 🙏