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
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)