From 0ec71d1b47dffe0d976554a76efa636cbe025e08 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Mon, 9 Mar 2020 19:06:15 +0100 Subject: fatcat_import: address potential hanging, if stdin is empty --- python/fatcat_import.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python') diff --git a/python/fatcat_import.py b/python/fatcat_import.py index b0fde01b..bb715fb6 100755 --- a/python/fatcat_import.py +++ b/python/fatcat_import.py @@ -47,6 +47,8 @@ def run_arxiv(args): "fatcat-{}-import-arxiv".format(args.kafka_env), ).run() else: + if args.xml_file == sys.stdin: + print('note: reading from stdin', file=sys.stderr) Bs4XmlFilePusher(ari, args.xml_file, "record").run() def run_pubmed(args): -- cgit v1.2.3