Skip to content

Commit f33f4ad

Browse files
committed
fix: address comments
Signed-off-by: yihong0618 <[email protected]>
1 parent d37d318 commit f33f4ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/_pyrepl/unix_console.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,9 @@ def prepare(self):
340340
tcsetattr(self.input_fd, termios.TCSADRAIN, raw)
341341
except termios.error as e:
342342
if e.args[0] != errno.EIO:
343+
# gh-135329: when running under external programs (like strace),
344+
# tcsetattr may fail with EIO. We can safely ignore this
345+
# and continue with default terminal settings.
343346
raise
344347

345348
# In macOS terminal we need to deactivate line wrap via ANSI escape code
@@ -376,9 +379,6 @@ def restore(self):
376379
tcsetattr(self.input_fd, termios.TCSADRAIN, self.__svtermstate)
377380
except termios.error as e:
378381
if e.args[0] != errno.EIO:
379-
# gh-135329: when running under external programs (like strace),
380-
# tcsetattr may fail with EIO. We can safely ignore this
381-
# and continue with default terminal settings.
382382
raise
383383

384384
if platform.system() == "Darwin" and os.getenv("TERM_PROGRAM") == "Apple_Terminal":

0 commit comments

Comments
 (0)