Ejemplo n.º 1
0
 def initsys(self, t):
     if t == "master":
         self.sig = mastersig(self)
     elif t == "worker":
         self.sig = workersig(self)
     self.evs = events() # init events
     self.tms = timers() # init timers
Ejemplo n.º 2
0
 def __init__(self, pesys):
     self.log = pesys.log
     self.cliconf = {}
     self.evs = events()
     self.tms = timers()
     self.cliconf["host"] = pesys.conf.cmdserver["host"]
     self.cliconf["port"] = pesys.conf.cmdserver["port"]
     tcpclient.__init__(self, self.cliconf, self.evs, self.tms)
     self.c = self.connect()
     self.c.set_recvmsg(self.displayresp)
     self.c.set_broken(self.brokenhandler)