1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

Handle OSError / Filesystem corruptions (#4127)

* Handle OSError / Filesystem corruptions

* Fix tests
This commit is contained in:
Pascal Vizeli
2023-02-28 19:57:05 +01:00
committed by GitHub
parent 440379680e
commit 692d34a13c
4 changed files with 21 additions and 9 deletions

View File

@@ -13,9 +13,9 @@ async def test_evaluate_system_error(coresys: CoreSys, capture_exception: Mock):
with patch(
"supervisor.resolution.evaluations.source_mods.calc_checksum_path_sourcecode",
side_effect=OSError,
side_effect=RuntimeError,
):
await coresys.resolution.evaluate.evaluate_system()
capture_exception.assert_called_once()
assert check_exception_chain(capture_exception.call_args[0][0], OSError)
assert check_exception_chain(capture_exception.call_args[0][0], RuntimeError)