diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-07-13 16:24:52 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-13 16:24:52 (GMT) |
| commit | f0c29a2d9f1df101efed8cda643bfff732c4e36b (patch) | |
| tree | d31c98eb85616c2de7e9a0655e1e6ae43c341947 /Lib/asyncio/__main__.py | |
| parent | 14c5bffcc552fec1276f078dd8d20688d4e71c78 (diff) | |
| download | cpython-f0c29a2d9f1df101efed8cda643bfff732c4e36b.zip cpython-f0c29a2d9f1df101efed8cda643bfff732c4e36b.tar.gz cpython-f0c29a2d9f1df101efed8cda643bfff732c4e36b.tar.bz2 | |
[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 a1834742936a3a2164c25c14ecf4ae6a95288ca3)
Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com>
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 3e2fe93..9514717 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 ( |
