diff options
author | Milan Oberkirch <milan.oberkirch@geops.com> | 2024-07-13 17:17:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-13 17:17:24 +0200 |
commit | a1834742936a3a2164c25c14ecf4ae6a95288ca3 (patch) | |
tree | 0f3e8a9a050647dccad160aa68217ebf71417e7a /Lib/asyncio/__main__.py | |
parent | 178e44de8f023be7a5dc400044ab61983b191f24 (diff) | |
download | cpython-a1834742936a3a2164c25c14ecf4ae6a95288ca3.tar.gz cpython-a1834742936a3a2164c25c14ecf4ae6a95288ca3.zip |
gh-121711: Set `-m asyncio` return_code to 1 for ENOTTY (#121714)
Set return_code to 1 for ENOTTY
Diffstat (limited to 'Lib/asyncio/__main__.py')
-rw-r--r-- | Lib/asyncio/__main__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/__main__.py b/Lib/asyncio/__main__.py index 3e2fe93943d..95147171c2b 100644 --- a/Lib/asyncio/__main__.py +++ b/Lib/asyncio/__main__.py @@ -106,7 +106,8 @@ class REPLThread(threading.Thread): 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 ( |