Skip to content

Commit 89fd522

Browse files
committed
Remove legacy 'comment' field when writing packet; use 'comments' instead
1 parent e695901 commit 89fd522

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

scapy/utils.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,7 +2122,6 @@ def _write_packet(self,
21222122
usec=None, # type: Optional[int]
21232123
caplen=None, # type: Optional[int]
21242124
wirelen=None, # type: Optional[int]
2125-
comment=None, # type: Optional[bytes]
21262125
ifname=None, # type: Optional[bytes]
21272126
direction=None, # type: Optional[int]
21282127
comments=None, # type: Optional[List[bytes]]
@@ -2206,7 +2205,6 @@ def write_packet(self,
22062205
if wirelen is None:
22072206
wirelen = caplen
22082207

2209-
comment = getattr(packet, "comment", None)
22102208
comments = getattr(packet, "comments", None)
22112209
ifname = getattr(packet, "sniffed_on", None)
22122210
direction = getattr(packet, "direction", None)
@@ -2222,7 +2220,6 @@ def write_packet(self,
22222220
rawpkt,
22232221
sec=f_sec, usec=usec,
22242222
caplen=caplen, wirelen=wirelen,
2225-
comment=comment,
22262223
ifname=ifname,
22272224
direction=direction,
22282225
linktype=linktype,
@@ -2378,7 +2375,6 @@ def _write_packet(self,
23782375
usec=None, # type: Optional[int]
23792376
caplen=None, # type: Optional[int]
23802377
wirelen=None, # type: Optional[int]
2381-
comment=None, # type: Optional[bytes]
23822378
ifname=None, # type: Optional[bytes]
23832379
direction=None, # type: Optional[int]
23842380
comments=None, # type: Optional[List[bytes]]
@@ -2614,7 +2610,6 @@ def _write_packet(self, # type: ignore
26142610
usec=None, # type: Optional[int]
26152611
caplen=None, # type: Optional[int]
26162612
wirelen=None, # type: Optional[int]
2617-
comment=None, # type: Optional[bytes]
26182613
ifname=None, # type: Optional[bytes]
26192614
direction=None, # type: Optional[int]
26202615
comments=None, # type: Optional[List[bytes]]

0 commit comments

Comments
 (0)