def addidx(self, idxname, idxpath): if self.isInit == False: logger.critical("No configuration loaded") return False self.myData.idxjson[idxname] = idxpath logger.info("INIT ADD idx [%s] from %s" % (idxname, idxpath))
def profile(self, fdata): if self.isInit == False: logger.critical("No configuration loaded") return False if self.stopIfError is True and self.noError is False: return False logger.debug("# load commun profile file : " + fdata) self.route(fdata, 'profile', '', True)
def sourcepath(self, sou=''): if self.isInit == False: logger.critical("No configuration loaded") return False if (sou == ''): sou = self.original_source_path self.myData.source_path = sou if not self.myData.source_path.endswith('\\'): self.myData.source_path = self.myData.source_path + '\\' logger.info("#") logger.info("# source_path : " + self.myData.source_path)
def sethistory(self, history, type=INFO): if (type == DEBUG): msg = "(debug history) " logger.debug(history) elif (type == CRITICAL): msg = "(!!!!!!!! history) " logger.critical(history) else: msg = "(history) " logger.debug(history) if (not self.history): self.history = [] self.history.append(msg + history)
def getjson(self): if self.isInit == False: logger.critical("No configuration loaded") return False return self.myData.idxjson_path
def getsource(self): if self.isInit == False: logger.critical("No configuration loaded") return False return self.original_source_path
def getmedia(self): if self.isInit == False: logger.critical("No configuration loaded") return False return self.myData.media_path
def getstatic(self): if self.isInit == False: logger.critical("No configuration loaded") return False return self.static