From 5f38c8133864f2923447fbe3210d00499f91a09e Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Mon, 16 Dec 2019 17:32:05 +0100 Subject: write diagnostic messages to stderr During debugging, it can be helpful to keep stdout (e.g. processing results) and dignostic messages separate. --- python/fatcat_tools/importers/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/fatcat_tools/importers/common.py b/python/fatcat_tools/importers/common.py index d51a5ff4..be5db8d8 100644 --- a/python/fatcat_tools/importers/common.py +++ b/python/fatcat_tools/importers/common.py @@ -507,7 +507,7 @@ class EntityImporter: return container_id def read_issn_map_file(self, issn_map_file): - print("Loading ISSN map file...") + print("Loading ISSN map file...", file=sys.stderr) self._issn_issnl_map = dict() for line in issn_map_file: if line.startswith("ISSN") or len(line) == 0: @@ -516,7 +516,7 @@ class EntityImporter: 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))) + print("Got {} ISSN-L mappings.".format(len(self._issn_issnl_map)), file=sys.stderr) def issn2issnl(self, issn): if issn is None: -- cgit v1.2.3