def readEvent(EventPath):
Origin = {}
logger.info('\033[31m Parsing EventFile \033[0m \n')
try:
for i in os.listdir(EventPath):
if fnmatch.fnmatch(i, '*.origin'):
evfile = os.path.join(EventPath,i)
fobj = open(evfile, 'r')
for line in fobj:
line = str.split(line, '=')
key = (line[0].replace('\'', '')).strip()
value = line[1].replace('\n','').strip()
Origin[key] = value
except:
logger.info('\033[31m File Error Exception \033[0m \n')
return Origin
评论列表
文章目录