Skip to content

Commit

Permalink
Add ValueError to Exception per #318
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrieder authored and kvid committed Jul 4, 2024
1 parent 646f66b commit 6eace6d
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 @@ -409,7 +409,7 @@ def _get_yaml_data_and_path(inp: Union[str, Path, Dict]) -> (Dict, Path):
yaml_path = Path(inp).expanduser().resolve(strict=True)
# if no FileNotFoundError exception happens, get file contents
yaml_str = open_file_read(yaml_path).read()
except (FileNotFoundError, OSError) as e:
except (FileNotFoundError, OSError, ValueError) as e:
# if inp is a long YAML string, Pathlib will raise OSError: [errno.ENAMETOOLONG]
# (in Windows, it seems OSError [errno.EINVAL] might be raised in some cases)
# when trying to expand and resolve it as a path.
Expand Down

0 comments on commit 6eace6d

Please # to comment.