From 18b43ce767126f8be2f1b25d8372bad200e26ede Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 4 Oct 2022 17:48:53 +0200 Subject: [PATCH] Catch OS-Error (#3924) --- supervisor/utils/yaml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervisor/utils/yaml.py b/supervisor/utils/yaml.py index e4f450fa2..9a9871ce2 100644 --- a/supervisor/utils/yaml.py +++ b/supervisor/utils/yaml.py @@ -18,7 +18,7 @@ def read_yaml_file(path: Path) -> dict: try: return _YAML.load(path) or {} - except (YAMLError, AttributeError) as err: + except (YAMLError, AttributeError, OSError) as err: raise YamlFileError( f"Can't read YAML file {path!s} - {err!s}", _LOGGER.error ) from err