From 06f6084e3be8748181135d35495cd5af33382e79 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Fri, 23 Apr 2021 23:46:43 -0400 Subject: [PATCH] ignore stdin when passed instead of throwing an error --- archivebox/logging_util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/archivebox/logging_util.py b/archivebox/logging_util.py index 6be14f02..a8c4e590 100644 --- a/archivebox/logging_util.py +++ b/archivebox/logging_util.py @@ -108,12 +108,12 @@ def reject_stdin(caller: str, stdin: Optional[IO]=sys.stdin) -> None: if not stdin.isatty(): # stderr('READING STDIN TO REJECT...') stdin_raw_text = stdin.read() - if stdin_raw_text: + if stdin_raw_text.strip(): # stderr('GOT STDIN!', len(stdin_str)) - stderr(f'[X] The "{caller}" command does not accept stdin.', color='red') + stderr(f'[!] The "{caller}" command does not accept stdin (ignoring).', color='red') stderr(f' Run archivebox "{caller} --help" to see usage and examples.') stderr() - raise SystemExit(1) + # raise SystemExit(1) return None