aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-10-08 17:33:51 -0700
committerBryan Newbold <bnewbold@archive.org>2020-10-08 17:33:51 -0700
commitd47e0725e66b7b6c7ac9466bbe4d4a21b0ab3ca0 (patch)
tree3370c6b8d9d91a2607133722b82a3136c28a3d7c
parent31370aea71a0fb42fc70821185f5e1ba312843d6 (diff)
downloadchocula-d47e0725e66b7b6c7ac9466bbe4d4a21b0ab3ca0.tar.gz
chocula-d47e0725e66b7b6c7ac9466bbe4d4a21b0ab3ca0.zip
vanished_inactive: more tolerant handling of unicode BOM
-rw-r--r--chocula/directories/vanished_inactive.py3
1 files changed, 2 insertions, 1 deletions
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