Catching a non-Exception object (KeyboardInterrupt)

Michael Goerz answer654 at 8439.e4ward.com
Mon Feb 4 14:53:52 CET 2008


Hi,

when I try to catch ctrl+c with

except KeyboardInterrupt:

pychecker tells me

Catching a non-Exception object (KeyboardInterrupt)

It works fine, but the message indicates that it's not completely clean. 
  How should I write the exception correctly?

Thanks,
Michael



More information about the Python-list mailing list