linspector-old/lib/tasks/xmpp.py

23 lines
510 B
Python
Raw Normal View History

2013-06-10 04:04:48 +02:00
"""
The xmpp task.
2013-06-18 00:10:14 +02:00
"""
from task import Task
2013-06-18 02:58:40 +02:00
2013-06-18 00:10:14 +02:00
class XmppTask(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 nor arguments!")
self.set_task_type(kwargs["type"])
self.recipient = kwargs["args"]["rcpt"]
def execute_task(self, msg):
pass
def create(taskDict):
2013-06-18 00:10:14 +02:00
return XmppTask(taskDict)