renamed filters to tasks... members.py needs some fixes now. think it is a good style to manage post processing.

This commit is contained in:
Johannes Findeisen 2013-06-05 07:26:53 +02:00
commit 851069cc2a
8 changed files with 55 additions and 48 deletions

16
lib/config/tasks.py Normal file
View file

@ -0,0 +1,16 @@
class Task:
def __init__(self, name="", command="", priority=0, comment=""):
self.name = name
self.command = command
self.priority = priority
self.comment = comment
def __str__(self):
return "Task('Name: " + self.name + "', 'Command: " + self.command + "', 'Priority: " + str(self.priority) + "')"
def clone(self):
return Task(self.name, self.command, self.priority, self.comment)
def parseTaskList(tasks):
return [Task(name, **values) for name, values in tasks.items()]