From d47e0725e66b7b6c7ac9466bbe4d4a21b0ab3ca0 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 8 Oct 2020 17:33:51 -0700 Subject: vanished_inactive: more tolerant handling of unicode BOM --- chocula/directories/vanished_inactive.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chocula/directories/vanished_inactive.py b/chocula/directories/vanished_inactive.py index 8b23525..61d6077 100644 --- a/chocula/directories/vanished_inactive.py +++ b/chocula/directories/vanished_inactive.py @@ -27,7 +27,8 @@ class VanishedInactiveLoader(DirectoryLoader): def parse_record(self, record) -> Optional[DirectoryInfo]: # HACK - record["Title"] = record["\ufeffTitle"] + if "\ufeffTitle" in record: + record["Title"] = record["\ufeffTitle"] if not record["Title"]: return None -- cgit v1.2.3