Skip to content

Commit d14c746

Browse files
committed
more pep8 fixes
1 parent 79f3d4c commit d14c746

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

scapy/contrib/dtn/bpv7.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,9 +563,9 @@ class CtrlFlags(IntFlag):
563563
PacketField("creation_timestamp", Timestamp(t=int(time.time())), Timestamp),
564564
CBORInteger("lifetime", 0),
565565
ConditionalField(CBORInteger("fragment_offset", 0),
566-
lambda pkt: pkt.flags & PrimaryBlock.CtrlFlags.BUNDLE_IS_FRAGMENT),
566+
lambda pkt: pkt.flags & PrimaryBlock.CtrlFlags.BUNDLE_IS_FRAGMENT),
567567
ConditionalField(CBORInteger("total_adu_length", 0),
568-
lambda pkt: pkt.flags & PrimaryBlock.CtrlFlags.BUNDLE_IS_FRAGMENT),
568+
lambda pkt: pkt.flags & PrimaryBlock.CtrlFlags.BUNDLE_IS_FRAGMENT),
569569
ConditionalField(
570570
MultipleTypeField(
571571
[
@@ -574,7 +574,7 @@ class CtrlFlags(IntFlag):
574574
],
575575
CBORNull("crc", None)
576576
), lambda pkt: pkt.crc_type != CrcTypes.NONE
577-
)
577+
)
578578
]
579579

580580
def dissect(self, s: bytes):
@@ -803,4 +803,4 @@ def post_dissect(self, s):
803803
self.canonical_blocks[idx] = new_block
804804

805805
new_block.encrypted_by.append(bcb_block.block_number)
806-
return s
806+
return s

scapy/contrib/dtn/cbor.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
from typing import Tuple, List, Union
2222

2323
MajorTypes = {
24-
0: "unsigned",
25-
1: "negative",
26-
2: "byte string",
27-
3: "text string",
28-
4: "array",
29-
5: "map",
30-
6: "tag",
31-
7: "simple/float"
24+
0: "unsigned",
25+
1: "negative",
26+
2: "byte string",
27+
3: "text string",
28+
4: "array",
29+
5: "map",
30+
6: "tag",
31+
7: "simple/float"
3232
}
3333

3434

scapy/contrib/dtn/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class NoPayloadPacket(Packet):
1212
def extract_padding(self, s):
1313
return "", s
1414

15-
1615
def post_dissect(self, s):
1716
try:
1817
if self[Raw].load is not None:

0 commit comments

Comments
 (0)