def loadConfig(): for location in core.CONFIGLOCATIONS: try: cfgfile=location+core.CONFIGFILE log.edebug("Attempting to load config from %s", cfgfile) loadFile(cfgfile) return except IOError as e: log.edebug("Failed! %s", str(e)) raise ConfigError("Failed to load any valid config files!")
def send(self, data): if self.sock is None: return False log.edebug("[>>>%s] %s", self.name, data.strip()) return self.sock.send(data)
def lostConnection(self, reason): log.edebug("%s: Lost connection: %s", self.name, reason) event.trigger('Server/Disconnect/'+self.name, net=self, reason=reason) self.disconnect()