Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fee3126

Browse files
committed
Catch curses.error instead of a non-existent global (PyChecker)
Edit comment
1 parent 40ea617 commit fee3126

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/curses/textpad.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ def do_command(self, ch):
6666
if y < self.maxy or x < self.maxx:
6767
# The try-catch ignores the error we trigger from some curses
6868
# versions by trying to write into the lowest-rightmost spot
69-
# in the self.window.
69+
# in the window.
7070
try:
7171
self.win.addch(ch)
72-
except ERR:
72+
except curses.error:
7373
pass
7474
elif ch == ascii.SOH: # ^a
7575
self.win.move(y, 0)

0 commit comments

Comments
 (0)