Commit be30743
fix: warning for blocking event loop when downloading backups (#169)
* Fix: Address blocking file operation in log (#145)
- Resolved Home Assistant warning about blocking file operations in the `auto_backup` integration (#145).
- Updated `handlers.py` to replace synchronous `open` calls with `aiofiles.open` for non-blocking file writes.
- Improved compatibility with Home Assistant's asyncio architecture, preventing event loop warnings.
- Verified changes to ensure integration functionality remains intact.
* chore: remove .DS_Store files
* refactor: format with black
* chore: add aiofiles dependency
---------
Co-authored-by: Josh Willox <joshwillox@gmail.com>1 parent f7c7f41 commit be30743
File tree
3 files changed
+15
-2
lines changed- custom_components/auto_backup
3 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | | - | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments