Created
January 31, 2013 17:41
-
-
Save ionelmc/4684698 to your computer and use it in GitHub Desktop.
billiard.common.restart_state _run_silenced monkey patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from billiard.common import restart_state | |
def _run_silenced(self, func): | |
import logging | |
try: | |
return func(self) | |
except Exception: | |
logging.exception("Shit has hit the fan in %r", func) | |
restart_state.step = lambda self, func=restart_state.step: _run_silenced(self, func) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment