-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: media_player.py: Prevent access to non-existent
accounts
data …
…during updates. - **Purpose**: Prevent access to non-existent `accounts` data during updates. - **Changes**: - **`async_update` Method**: - Introduced checks using the `get` method to safely access nested dictionary keys. - Added warnings and early returns if required data structures are missing. - **Other Methods (`async_select_source`, etc.)**: - Applied similar conditional checks to ensure robust data access. - **Comments**: - Updated all comments to English for consistency and clarity. - **Best Practices**: - Adhered to Python 3.12 best practices, including the use of `is None` instead of `== None`, proper type annotations, and structured logging.
- Loading branch information
1 parent
81e2c81
commit 7025624
Showing
1 changed file
with
35 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters