Skip to content

Instantly share code, notes, and snippets.

View git2samus's full-sized avatar

Michael Cetrulo git2samus

View GitHub Profile
# allow to silence error reporting for certain 'expected exceptions'
# gevent prints a error report including a traceback for each failed
# greenlet. this is at times useful, but you're currently forced to
# either handle exceptions in those greenlets or live with the traceback
# on stderr.
# patch_gevent introduces a class variable 'expected_exceptions' to
# gevent's greenlet class. This is a tuple of exceptions for which no
# error report should be printed to stderr.