aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2022-07-29 17:43:13 -0700
committerBryan Newbold <bnewbold@archive.org>2022-07-29 17:43:13 -0700
commit0e5b516b3c8897284b6b0560a860bde29e7eb72e (patch)
treedc8f361d1b46612e2dbd535199b8f8e4532fb6b7
parentfed9e4064ca37556c5ff2919e4507b532b793df3 (diff)
downloadchocula-0e5b516b3c8897284b6b0560a860bde29e7eb72e.tar.gz
chocula-0e5b516b3c8897284b6b0560a860bde29e7eb72e.zip
database: work around annoying ISSN-L column issue
-rw-r--r--chocula/database.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/chocula/database.py b/chocula/database.py
index 3840ae3..d4b7a03 100644
--- a/chocula/database.py
+++ b/chocula/database.py
@@ -206,7 +206,7 @@ class IssnDatabase:
print("##### Loading ISSN-L map file...", file=sys.stderr)
with open(issn_map_path, "r") as issn_map_file:
for line in issn_map_file:
- if line.startswith("ISSN") or len(line) == 0:
+ if line.startswith("ISSN") or len(line) == 0 or len(line.split()) < 2:
continue
(issn, issnl) = line.split()[0:2]
self.issn_issnl_map[issn] = issnl