]> granicus.if.org Git - python/commitdiff
Catch curses.error instead of a non-existent global (PyChecker)
authorAndrew M. Kuchling <amk@amk.ca>
Mon, 13 Aug 2001 13:47:23 +0000 (13:47 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Mon, 13 Aug 2001 13:47:23 +0000 (13:47 +0000)
Edit comment

Lib/curses/textpad.py

index e0e3d8bdceb064880e12c82a6eb3f3484a619db4..2b036486285763c5cc56edeca3a7ea2cf5786945 100644 (file)
@@ -66,10 +66,10 @@ class Textbox:
             if y < self.maxy or x < self.maxx:
                 # The try-catch ignores the error we trigger from some curses
                 # versions by trying to write into the lowest-rightmost spot
-                # in the self.window.
+                # in the window.
                 try:
                     self.win.addch(ch)
-                except ERR:
+                except curses.error:
                     pass
         elif ch == ascii.SOH:                          # ^a
             self.win.move(y, 0)