whitespaces at night...
This commit is contained in:
parent
ce631ad12d
commit
c463f2473d
11 changed files with 28 additions and 40 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue