From 646f66b145a85afb472547c34a64ffbf7cecfe88 Mon Sep 17 00:00:00 2001 From: Martin Rieder <74277074+martinrieder@users.noreply.github.com> Date: Thu, 20 Jun 2024 13:19:58 +0200 Subject: [PATCH] Exception on e.errno is None. Fixes #391. --- src/wireviz/wireviz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wireviz/wireviz.py b/src/wireviz/wireviz.py index 6e0ab82d..a8645c70 100755 --- a/src/wireviz/wireviz.py +++ b/src/wireviz/wireviz.py @@ -416,7 +416,7 @@ def _get_yaml_data_and_path(inp: Union[str, Path, Dict]) -> (Dict, Path): # Catch this error, but raise any others from errno import EINVAL, ENAMETOOLONG - if type(e) is OSError and e.errno not in (EINVAL, ENAMETOOLONG): + if type(e) is OSError and e.errno not in (EINVAL, ENAMETOOLONG, None): raise e # file does not exist; assume inp is a YAML string yaml_str = inp