Catch yaml load errors
MODIFY
plextraktsync/config.py
plextraktsync/config.py
@@ -74,7 +74,10 @@ def load_yaml(path: str):
import yaml
with open(path, "r", encoding="utf-8") as fp:
+ try:
config = yaml.safe_load(fp)
+ except yaml.YAMLError as e:
+ raise RuntimeError(f"Unable to parse {path}: {e}")
return config
@staticmethod

Catch yaml load errors