Skip to content

Commit 06f6084

Browse files
committed
ignore stdin when passed instead of throwing an error
1 parent 431020e commit 06f6084

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

archivebox/logging_util.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ def reject_stdin(caller: str, stdin: Optional[IO]=sys.stdin) -> None:
108108
if not stdin.isatty():
109109
# stderr('READING STDIN TO REJECT...')
110110
stdin_raw_text = stdin.read()
111-
if stdin_raw_text:
111+
if stdin_raw_text.strip():
112112
# stderr('GOT STDIN!', len(stdin_str))
113-
stderr(f'[X] The "{caller}" command does not accept stdin.', color='red')
113+
stderr(f'[!] The "{caller}" command does not accept stdin (ignoring).', color='red')
114114
stderr(f' Run archivebox "{caller} --help" to see usage and examples.')
115115
stderr()
116-
raise SystemExit(1)
116+
# raise SystemExit(1)
117117
return None
118118

119119

0 commit comments

Comments
 (0)