linspector-old/lib/tasks/xmpp.py
Rafael.Timmerberg 3b6a3a55da strange behavior, really really strange! I gues monthy
python is coming from death to just kidding me!
2013-06-19 02:45:37 +02:00

23 lines
No EOL
512 B
Python

"""
The xmpp task.
"""
from task import Task
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):
return XmppTask(**taskDict)