aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat/importer_common.py
diff options
context:
space:
mode:
authorVinay Goel <vinay@archive.org>2018-06-21 21:25:16 +0000
committerVinay Goel <vinay@archive.org>2018-06-21 21:25:16 +0000
commit801abe6ed54ce8cd7d602d8d2ad4ced5b3502b9f (patch)
treeb8357e7531203ea5540e0c06df5406cf1fc79650 /python/fatcat/importer_common.py
parent5b376b98ca6fe8e9f75a42c807786a2aa9a52d94 (diff)
downloadfatcat-801abe6ed54ce8cd7d602d8d2ad4ced5b3502b9f.tar.gz
fatcat-801abe6ed54ce8cd7d602d8d2ad4ced5b3502b9f.zip
more importer fixes
Diffstat (limited to 'python/fatcat/importer_common.py')
-rw-r--r--python/fatcat/importer_common.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/fatcat/importer_common.py b/python/fatcat/importer_common.py
index 9ec64e8f..6f867f70 100644
--- a/python/fatcat/importer_common.py
+++ b/python/fatcat/importer_common.py
@@ -55,7 +55,7 @@ class FatcatImporter:
"""Caches calls to the ISSN-L lookup API endpoint in a local dict"""
assert len(issnl) == 9 and issnl[4] == '-'
if issnl in self._issnl_id_map:
- return self._issnl_id_map[issn]
+ return self._issnl_id_map[issnl]
container_id = None
try:
rv = self.api.lookup_container(issnl=issnl)
@@ -98,6 +98,7 @@ class FatcatImporter:
return release_id
def read_issn_map_file(self, issn_map_file):
+ print("Loading ISSN map file...")
self._issn_issnl_map = dict()
for line in issn_map_file:
if line.startswith("ISSN") or len(line) == 0:
@@ -106,6 +107,7 @@ class FatcatImporter:
self._issn_issnl_map[issn] = issnl
# double mapping makes lookups easy
self._issn_issnl_map[issnl] = issnl
+ print("Got {} ISSN-L mappings.".format(len(self._issn_issnl_map)))
def issn2issnl(self, issn):
if issn is None: