whitespaces at night...
This commit is contained in:
parent
3b6a3a55da
commit
72354b4ed4
11 changed files with 28 additions and 40 deletions
|
|
@ -2,7 +2,7 @@
|
|||
The email task.
|
||||
"""
|
||||
|
||||
from lib.tasks.task import Task
|
||||
from task import Task
|
||||
|
||||
|
||||
class EmailTask(Task):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
"""
|
||||
Created on Jun 15, 2013
|
||||
|
||||
@author: Rafael Timmerberg
|
||||
The task class.
|
||||
"""
|
||||
|
||||
|
||||
|
|
@ -16,8 +14,7 @@ class Task:
|
|||
|
||||
Be aware! this method can only get called once!
|
||||
|
||||
params:
|
||||
taskType: the type of this task
|
||||
:param taskType: the type of this task
|
||||
"""
|
||||
if hasattr(self, "_taskType"):
|
||||
raise Exception("taskType is only allowed to set once!")
|
||||
|
|
@ -25,7 +22,7 @@ class Task:
|
|||
|
||||
def get_task_type(self):
|
||||
"""
|
||||
returns the type set by set_type_task
|
||||
:return: the type set by set_type_task
|
||||
"""
|
||||
return self._taskType
|
||||
|
||||
|
|
@ -36,8 +33,7 @@ class Task:
|
|||
|
||||
default does nothing
|
||||
|
||||
params:
|
||||
msg: the msg for this task
|
||||
:param msg: the msg for this task
|
||||
"""
|
||||
pass
|
||||
|
||||
|
|
@ -47,12 +43,10 @@ class Task:
|
|||
It determines if it has an appropriate type by comparing taskType with get_task_type().
|
||||
Calls execute_task() if the type matches
|
||||
|
||||
params:
|
||||
taskType: the type of the fail which is compared with get_task_type()
|
||||
msg: the error message
|
||||
:param taskType: the type of the fail which is compared with get_task_type()
|
||||
:param msg: the error message
|
||||
|
||||
return:
|
||||
True if execute_task() is called succesfully, else False
|
||||
:return: True if execute_task() is called succesfully, else False
|
||||
"""
|
||||
if self.get_task_type() == taskType:
|
||||
self.execute_task(msg)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,5 @@ class XmppTask(Task):
|
|||
pass
|
||||
|
||||
|
||||
|
||||
def create(taskDict):
|
||||
return XmppTask(**taskDict)
|
||||
Loading…
Add table
Add a link
Reference in a new issue