(self, func, *args, **kwargs)
| 278 | yield from self.cleanup() |
| 279 | |
| 280 | def register_on_finish(self, func, *args, **kwargs): |
| 281 | warnings.warn("Use .on_cleanup.append() instead", DeprecationWarning) |
| 282 | self.on_cleanup.append(lambda app: func(app, *args, **kwargs)) |
| 283 | |
| 284 | def copy(self): |
| 285 | raise NotImplementedError |