mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
traffic: Packet.from_line classmethod uses cls var
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
d1a1c5d601
commit
709d2c84cb
@ -162,7 +162,7 @@ class Packet(object):
|
||||
self.endpoints = (self.dest, self.src)
|
||||
|
||||
@classmethod
|
||||
def from_line(self, line):
|
||||
def from_line(cls, line):
|
||||
fields = line.rstrip('\n').split('\t')
|
||||
(timestamp,
|
||||
ip_protocol,
|
||||
@ -178,8 +178,8 @@ class Packet(object):
|
||||
src = int(src)
|
||||
dest = int(dest)
|
||||
|
||||
return Packet(timestamp, ip_protocol, stream_number, src, dest,
|
||||
protocol, opcode, desc, extra)
|
||||
return cls(timestamp, ip_protocol, stream_number, src, dest,
|
||||
protocol, opcode, desc, extra)
|
||||
|
||||
def as_summary(self, time_offset=0.0):
|
||||
"""Format the packet as a traffic_summary line.
|
||||
|
Loading…
Reference in New Issue
Block a user