Catching a non-Exception object (KeyboardInterrupt)
Duncan Booth
duncan.booth at invalid.invalid
Mon Feb 4 09:27:57 EST 2008
Hrvoje Niksic <hniksic at xemacs.org> wrote:
> Michael Goerz <answer654 at 8439.e4ward.com> writes:
>
>> when I try to catch ctrl+c with
>>
>> except KeyboardInterrupt:
>>
>> pychecker tells me
>>
>> Catching a non-Exception object (KeyboardInterrupt)
>
> Looks like a pychecker bug. It might be confused by KeyboardInterrupt
> being derived not from Exception, but from BaseException.
>
There's a patch for this see:
https://thomas.apestaart.org/thomas/trac/changeset/938?format=diff&new=938
but it looks like pychecker isn't being maintained because nothing has
changed for more than 2 years.
More information about the Python-list
mailing list