bootstrap-vz/base/task.py
Anders Ingemann 0092e1c2c2 Don't instantiate tasks
In practice they are just typed functions with attributes, having a reference to an object is just confusing.
So: Task.run() is now a classmethod
2014-01-06 22:58:21 +01:00

17 lines
283 B
Python

class Task(object):
phase = None
predecessors = []
successors = []
class __metaclass__(type):
def __repr__(cls):
return '{module}.{task}'.format(module=cls.__module__, task=cls.__name__)
def __str__(cls):
return repr(cls)
@classmethod
def run(cls, info):
pass