[PATCH 3/4] Re: Catch KeyboardInterrupts and raise them

Nicolas Sebrecht nicolas.s-dev at laposte.net
Wed Dec 22 22:45:44 GMT 2010


On Wed, Dec 22, 2010 at 03:27:19PM +0100, Sebastian Spaeth wrote:
> 
> This was previously not important as most of the code was never run in the main thread and thus never got to see KeyboardInterrupts.
> In preparation for true singlethreaded mode, we need to protect against KeyboardInterrupts and raise them to the top, cleanly exiting after a ctrl-c.

You're talking about the KeyboardInterrupt but not the SystemExit you
are raising too.

Why do you raise on both except at some lines but not at the others?

The commit message shouldn't have lines longer than 72-80 characters.

>                  except:
> +                    #TODO, we should catch a specific Exception here, not ALL. But which?
>                      pass

What do you have in mind? Why do we only catch one specific exception?

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list