Package linspector :: Package lib :: Package tasks :: Module xmpp
[hide private]
[frames] | no frames]

Source Code for Module linspector.lib.tasks.xmpp

 1  """ 
 2  The xmpp task. 
 3  """ 
 4   
 5  from task import Task 
 6   
 7   
8 -class XmppTask(Task):
9 - def __init__(self, **kwargs):
10 if not "type" in kwargs: 11 raise Exception("'type' not in typeDict " + str(kwargs)) 12 if not "args" in kwargs: 13 raise Exception("typeDict " + str(kwargs) + " has nor arguments!") 14 self.set_task_type(kwargs["type"]) 15 self.recipient = kwargs["args"]["rcpt"]
16
17 - def execute_task(self, msg):
18 pass
19 20
21 -def create(taskDict):
22 return XmppTask(**taskDict)
23