Fix crash on startup

Add publishers.json to pip package
Add exception handling to prevent crash
This commit is contained in:
lordwelch 2022-05-19 20:13:59 -07:00
parent 2bf943e971
commit 563d05cdfd

View File

@ -275,4 +275,7 @@ publishers: dict[str, ImprintDict] = {}
def load_publishers() -> None:
update_publishers(json.loads((pathlib.Path(__file__).parent / "data" / "publishers.json").read_text("utf-8")))
try:
update_publishers(json.loads((pathlib.Path(__file__).parent / "data" / "publishers.json").read_text("utf-8")))
except Exception:
logger.exception("Failed to load publishers.json; The are no publishers or imprints loaded")