Skip to content

Commit

Permalink
Exception on e.errno is None. Fixes #391.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrieder authored and kvid committed Jul 4, 2024
1 parent 014c1f2 commit 646f66b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wireviz/wireviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 646f66b

Please sign in to comment.