File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
usr/lib/python3/dist-packages/stdisplay Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 15
15
def main () -> None :
16
16
"""Safely print stdin or file to stdout."""
17
17
# https://github.com/pytest-dev/pytest/issues/4843
18
- if "pytest" not in modules :
18
+ if "pytest" not in modules and stdin is not None :
19
19
stdin .reconfigure (errors = "ignore" ) # type: ignore
20
20
## File input reads stdin when no file is provided or file is '-'.
21
21
for untrusted_text in file_input (encoding = "ascii" , errors = "replace" ):
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def main() -> None:
20
20
main
21
21
"""
22
22
# https://github.com/pytest-dev/pytest/issues/4843
23
- if "pytest" not in modules :
23
+ if "pytest" not in modules and stdin is not None :
24
24
stdin .reconfigure (errors = "ignore" ) # type: ignore
25
25
26
26
for line in file_input (encoding = "ascii" , errors = "replace" ):
Original file line number Diff line number Diff line change 16
16
def main () -> None :
17
17
"""Safely print stdin to stdout or file."""
18
18
# https://github.com/pytest-dev/pytest/issues/4843
19
- if "pytest" not in modules :
19
+ if "pytest" not in modules and stdin is not None :
20
20
stdin .reconfigure (errors = "ignore" ) # type: ignore
21
21
untrusted_text_list = []
22
22
for untrusted_text in stdin :
Original file line number Diff line number Diff line change 13
13
def main () -> None :
14
14
"""Safely print stdin to stdout and file."""
15
15
# https://github.com/pytest-dev/pytest/issues/4843
16
- if "pytest" not in modules :
16
+ if "pytest" not in modules and stdin is not None :
17
17
stdin .reconfigure (errors = "ignore" ) # type: ignore
18
18
untrusted_text_list = []
19
19
for untrusted_text in stdin :
You can’t perform that action at this time.
0 commit comments