10 from sys
import stderr
18 logger = logging.getLogger(
'hce')
19 logger.setLevel(logging.DEBUG)
22 ch = logging.StreamHandler()
23 ch.setLevel(logging.DEBUG)
26 formatter = logging.Formatter(
'%(asctime)s - %(name)s - %(levelname)s - %(message)s')
29 ch.setFormatter(formatter)
38 CONFIG_NAME =
"../../ini/db-task.ini" 39 cfgParser = ConfigParser.ConfigParser()
40 cfgParser.read(CONFIG_NAME)
41 return DBTasksWrapper.DBTasksWrapper(cfgParser)
48 contentData =
'****************<!--TEST-->*****************' 50 json =
"[{\"WHERE\":\"RAW\", \"WHAT\":\"<!--(.*)-->\", \"WITH\":\" \", \"CONDITION\":\"ContentType='text/html'\"}]" 52 sqlExpression =
"ContentType='text/html'" 53 siteId =
'40d202ab0424bd4ff6768171befd98e4' 60 logger.debug(
"contentData: %s",
varDump(contentData))
61 contentData = ContentEvaluator.executeReplace(dbWrapper, siteId, json, contentData)
63 logger.debug(
"contentData: %s",
varDump(contentData))
def varDump(obj, stringify=True, strTypeMaxLen=256, strTypeCutSuffix='...', stringifyType=1, ignoreErrors=False, objectsHash=None, depth=0, indent=2, ensure_ascii=False, maxDepth=10)