22 lines
No EOL
508 B
Python
22 lines
No EOL
508 B
Python
"""
|
|
The sms task.
|
|
"""
|
|
|
|
from task import Task
|
|
|
|
|
|
class SmsTask(Task):
|
|
def __init__(self, **kwargs):
|
|
if not "type" in kwargs:
|
|
raise Exception("'type' not in typeDict " + str(kwargs))
|
|
if not "args" in kwargs:
|
|
raise Exception("typeDict " + str(kwargs) + " has no arguments!")
|
|
self.set_task_type(kwargs["type"])
|
|
self.recipient = kwargs["args"]["rcpt"]
|
|
|
|
def execute_task(self, msg):
|
|
pass
|
|
|
|
|
|
def create(taskDict):
|
|
return SmsTask(**taskDict) |