Fix potential use of variable before initialisation.

This commit is contained in:
Arvid Norlander 2020-08-06 10:41:45 +02:00
parent 6a5a32d29f
commit ee6fc3cdd8
No known key found for this signature in database
GPG key ID: E824A8E5D8D29AA0

View file

@ -194,7 +194,9 @@ def merge_chunks(cs):
return b''.join([pack('<HH', key, len(val)) + val for key, val in cs])
def dump_all(b):
def dump_all(b: bytes):
ts = None # type: typing.Optional[bytes]
ts_off = None # type: typing.Optional[int]
while len(b) > 0:
(typ, sz), b = unpack('<HH', b[:4]), b[4:]
p, b = b[:sz], b[sz:]