Created
May 30, 2015 21:51
-
-
Save tcatm/e7f4e2f847f61379075a to your computer and use it in GitHub Desktop.
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
def wrap_housekeeping(f): | |
def inner(self, *args): | |
d = None | |
try: | |
ret = f(self, *args) | |
except Exception as e: | |
d = e | |
self.loop.create_task(self.housekeeping()) | |
if d: | |
raise d | |
return ret | |
return inner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment