Exemple #1
0
 def start(self,port,param):
     """/** Starts import the config file ( or other stream), and sets the parentrouter.
     If the port (evenDoor and evenBoard) need to send an evenData. */"""
     ret = Fport.start(self,port,param)
     if ret == RET_OK:
         return self.createRoom()
     return ret
Exemple #2
0
 def start(self,port,node):
     ret = Fport.start(self,port,node)
     if ret == RET_OK:
         self.gotoChildren()
         if self.Find("filename",False) == RET_OK:
             str = self.getContent()
             try:
                 self.file = file(str,"rw")
             except:
                 return RET_CANNOTACCESS
             self.filename = str
         if file <> None:
             data = self.getFreeEvenData()
             data.definePortAction(ACT_GET,self.getString())
             self.sendEvenData(data)
         else:
             return RET_CANNOTACCESS
     return ret