format needs {}

This commit is contained in:
Michel Oosterhof
2018-07-06 23:24:12 +00:00
parent 2dff11e678
commit 28b6f6e7a7

View File

@ -176,11 +176,11 @@ class Output(object):
sessionno = 0 sessionno = 0
telnetmatch = self.telnetRegex.match(ev['system']) telnetmatch = self.telnetRegex.match(ev['system'])
if telnetmatch: if telnetmatch:
sessionno = 'T'.format(telnetmatch.groups()[0]) sessionno = 'T{}'.format(telnetmatch.groups()[0])
else: else:
sshmatch = self.sshRegex.match(ev['system']) sshmatch = self.sshRegex.match(ev['system'])
if sshmatch: if sshmatch:
sessionno = 'S'.format(sshmatch.groups()[0]) sessionno = 'S{}'.format(sshmatch.groups()[0])
if sessionno == 0: if sessionno == 0:
return return