fix sessoinno

This commit is contained in:
Michel Oosterhof
2016-09-19 16:00:26 +00:00
parent d0eac4dcba
commit a8c7f4da4c

View File

@@ -159,6 +159,7 @@ class Output(object):
del ev['sessionno']
# Extract session id from the twisted log prefix
elif 'system' in ev:
sessionno = 0
telnetmatch = self.telnetRegex.match(ev['system'])
if telnetmatch:
sessionno = 'T'+str(telnetmatch.groups()[0])
@@ -166,7 +167,7 @@ class Output(object):
sshmatch = self.sshRegex.match(ev['system'])
if sshmatch:
sessionno = 'S'+str(sshmatch.groups()[0])
if not sessionno:
if sessionno == 0:
return
if sessionno in self.ips: