Merge pull request #38132 from iddocohen/develop

Fixing bug in log.py - used .copy instead of .copy()
This commit is contained in:
Mike Place 2016-12-07 11:48:19 -07:00 committed by GitHub
commit f4b6f815d4

View File

@ -73,7 +73,7 @@ def beacon(config):
ret = [] ret = []
if 'file' not in config: if 'file' not in config:
event = SKEL.copy event = SKEL.copy()
event['tag'] = 'global' event['tag'] = 'global'
event['error'] = 'file not defined in config' event['error'] = 'file not defined in config'
ret.append(event) ret.append(event)
@ -101,8 +101,8 @@ def beacon(config):
try: try:
d[tag] = re.compile(r'{0}'.format(config[tag]['regex'])) d[tag] = re.compile(r'{0}'.format(config[tag]['regex']))
except Exception: except Exception:
event = SKEL.copy event = SKEL.copy()
event['tag'] = str(tag) event['tag'] = tag
event['error'] = 'bad regex' event['error'] = 'bad regex'
ret.append(event) ret.append(event)
@ -111,14 +111,14 @@ def beacon(config):
try: try:
m = reg.match(line) m = reg.match(line)
if m: if m:
event = SKEL.copy event = SKEL.copy()
event['tag'] = str(tag) event['tag'] = tag
event['raw'] = str(line) event['raw'] = line
event['match'] = 'yes' event['match'] = 'yes'
ret.append(event) ret.append(event)
except Exception: except Exception:
event = SKEL.copy event = SKEL.copy()
event['tag'] = str(tag) event['tag'] = tag
event['error'] = 'bad match' event['error'] = 'bad match'
ret.append(event) ret.append(event)
return ret return ret