Exemple #1
0
    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))
Exemple #2
0
    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)
Exemple #3
0
    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)
Exemple #4
0
 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)
Exemple #5
0
 def getjson(self):
     if self.isInit == False:
         logger.critical("No configuration loaded")
         return False
     return self.myData.idxjson_path
Exemple #6
0
 def getsource(self):
     if self.isInit == False:
         logger.critical("No configuration loaded")
         return False
     return self.original_source_path
Exemple #7
0
 def getmedia(self):
     if self.isInit == False:
         logger.critical("No configuration loaded")
         return False
     return self.myData.media_path
Exemple #8
0
 def getstatic(self):
     if self.isInit == False:
         logger.critical("No configuration loaded")
         return False
     return self.static