mirror of
https://github.com/python/cpython.git
synced 2025-10-30 13:11:29 +00:00
[3.13] gh-121711: Set -m asyncio return_code to 1 for ENOTTY (GH-121714) (GH-121718)
Set return_code to 1 for ENOTTY
(cherry picked from commit a183474293)
Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com>
This commit is contained in:
parent
14c5bffcc5
commit
f0c29a2d9f
2 changed files with 5 additions and 4 deletions
|
|
@ -106,7 +106,8 @@ def run(self):
|
|||
if os.getenv("PYTHON_BASIC_REPL"):
|
||||
raise RuntimeError("user environment requested basic REPL")
|
||||
if not os.isatty(sys.stdin.fileno()):
|
||||
raise OSError(errno.ENOTTY, "tty required", "stdin")
|
||||
return_code = errno.ENOTTY
|
||||
raise OSError(return_code, "tty required", "stdin")
|
||||
|
||||
# This import will fail on operating systems with no termios.
|
||||
from _pyrepl.simple_interact import (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue