Skip to content

Commit bdacfe5

Browse files
committed
Catch error when trying to read SQLite DBs from stdin
1 parent ba6baae commit bdacfe5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

klp.py

+2
Original file line numberDiff line numberDiff line change
@@ -5750,6 +5750,8 @@ def file_opener(
57505750
... content = f.read()
57515751
"""
57525752
if filename in ["-", None]:
5753+
if sqlite_mode:
5754+
raise ValueError("SQLite databases cannot be read from stdin")
57535755
yield sys.stdin
57545756
elif filename.lower().endswith(".gz"):
57555757
with gzip.open(filename, "rt", encoding=encoding) as f:

0 commit comments

Comments
 (0)