Skip to content

Commit 16998d5

Browse files
committed
style: Comply with E275
1 parent 74119f1 commit 16998d5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

espsecure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def validate_signature_block(image_content, sig_blk_num):
484484

485485
offset = -SECTOR_SIZE + sig_blk_num * SIG_BLOCK_SIZE
486486
sig_blk = image_content[offset: offset + SIG_BLOCK_SIZE]
487-
assert(len(sig_blk) == SIG_BLOCK_SIZE)
487+
assert len(sig_blk) == SIG_BLOCK_SIZE
488488

489489
# note: in case of ECDSA key, the exact fields in the middle are wrong (but unused here)
490490
magic, version, _, _, _, _, _, _, blk_crc = struct.unpack("<BBxx32s384sI384sI384sI16x",

esptool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2869,7 +2869,7 @@ def maybe_patch_segment_data(self, f, segment_data):
28692869
if segment_data[patch_offset:patch_offset + self.SHA256_DIGEST_LEN] != b'\x00' * self.SHA256_DIGEST_LEN:
28702870
raise FatalError('Contents of segment at SHA256 digest offset 0x%x are not all zero. Refusing to overwrite.' %
28712871
self.elf_sha256_offset)
2872-
assert(len(self.elf_sha256) == self.SHA256_DIGEST_LEN)
2872+
assert len(self.elf_sha256) == self.SHA256_DIGEST_LEN
28732873
segment_data = segment_data[0:patch_offset] + self.elf_sha256 + \
28742874
segment_data[patch_offset + self.SHA256_DIGEST_LEN:]
28752875
return segment_data

0 commit comments

Comments
 (0)