Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def dist_task(f):
- f.is_dist_task = True
- class Foo(object):
- @dist_task
- def install(self):
- pass
- @property
- def dist_tasks(self):
- return {
- x: getattr(self, x)
- for x in dir(self)
- if isroutine(getattr(self, x))
- and getattr(getattr(self, x), 'is_dist_task', False)]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement