116
117
return _do_with_cleanups(
117
118
self.cleanups, self.func, self, *args, **kwargs)
122
self.cleanups, self.func, *args, **kwargs)
120
125
def _do_with_cleanups(cleanup_funcs, func, *args, **kwargs):
121
126
"""Run `func`, then call all the cleanup_funcs.