diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2018-10-19 16:41:36 +1300 |
---|---|---|
committer | Douglas Bagnall <dbagnall@samba.org> | 2019-01-08 23:55:32 +0100 |
commit | 709d2c84cb3b3c7a570b0f915b578bb98e48e3f0 (patch) | |
tree | aa6cb33f5adfff6eb599e9c39b0b63c6ebf42918 /python | |
parent | d1a1c5d60113727fad1208c91060f4d318dea412 (diff) | |
download | samba-709d2c84cb3b3c7a570b0f915b578bb98e48e3f0.tar.gz |
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>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/emulate/traffic.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/samba/emulate/traffic.py b/python/samba/emulate/traffic.py index 291162f279a..0414813704d 100644 --- a/python/samba/emulate/traffic.py +++ b/python/samba/emulate/traffic.py @@ -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. |