diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2019-12-16 17:32:05 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2019-12-16 17:32:05 +0100 |
commit | 5f38c8133864f2923447fbe3210d00499f91a09e (patch) | |
tree | a836df074629c8d5feecf023bf9a50631ebf91e1 | |
parent | 47eaf6ae5b46e809bd2dc9a204bfa0db8f73dc17 (diff) | |
download | fatcat-5f38c8133864f2923447fbe3210d00499f91a09e.tar.gz fatcat-5f38c8133864f2923447fbe3210d00499f91a09e.zip |
write diagnostic messages to stderr
During debugging, it can be helpful to keep stdout (e.g. processing
results) and dignostic messages separate.
-rw-r--r-- | python/fatcat_tools/importers/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: |