mirror of https://github.com/python/cpython
Catch curses.error instead of a non-existent global (PyChecker)
Edit comment
This commit is contained in:
parent
40ea6177b9
commit
fee3126eb3
|
@ -66,10 +66,10 @@ class Textbox:
|
||||||
if y < self.maxy or x < self.maxx:
|
if y < self.maxy or x < self.maxx:
|
||||||
# The try-catch ignores the error we trigger from some curses
|
# The try-catch ignores the error we trigger from some curses
|
||||||
# versions by trying to write into the lowest-rightmost spot
|
# versions by trying to write into the lowest-rightmost spot
|
||||||
# in the self.window.
|
# in the window.
|
||||||
try:
|
try:
|
||||||
self.win.addch(ch)
|
self.win.addch(ch)
|
||||||
except ERR:
|
except curses.error:
|
||||||
pass
|
pass
|
||||||
elif ch == ascii.SOH: # ^a
|
elif ch == ascii.SOH: # ^a
|
||||||
self.win.move(y, 0)
|
self.win.move(y, 0)
|
||||||
|
|
Loading…
Reference in New Issue