Skip to content

Commit fb63940

Browse files
Update Lib/_pyrepl/windows_console.py
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
1 parent 4647e00 commit fb63940

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Lib/_pyrepl/windows_console.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,7 @@ def _has_wrapped_to_next_row(self, y: int) -> bool | None:
258258
"""
259259
info = CONSOLE_SCREEN_BUFFER_INFO()
260260
if not GetConsoleScreenBufferInfo(OutHandle, info):
261-
err = get_last_error()
262-
if err == 6: # ERROR_INVALID_HANDLE
263-
return None
264-
raise WinError(err)
261+
raise WinError(get_last_error())
265262

266263
win_y = int(info.dwCursorPosition.Y - info.srWindow.Top)
267264
expected = y - self.__offset

0 commit comments

Comments
 (0)