logbook's Logger class has a convenience context manager catch_exceptions. [1] is the implementation on GitHub for reference. Right now it catches all exceptions, however I think the SystemExit/KeyboardInterrupt exceptions raised by sys.exit() and ctrl-c shouldn't be caught. In other words the imaginary exception handler should be 'except Exception:' and not 'except:'. I can prepare a patch to do this (check to see if the 2nd argument, exc_value, isinstance() of Exception) but I'd like feedback if this change is welcome.
[1] https://github.com/mitsuhiko/logbook/blob/master/logbook/base.py#L165 -- You received this message because you are subscribed to the Google Groups "pocoo-libs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pocoo-libs. For more options, visit https://groups.google.com/groups/opt_out.
