Don't attempt to decode magic bytes
Since they're wrong, they're likely not decodable anyways.
This commit is contained in:
parent
25fe2067cd
commit
a64f2726d0
@ -2230,4 +2230,4 @@ def read_magic_bytes(stream: io.BufferedIOBase):
|
|||||||
magic = _read(stream, len(MAGIC_BYTES))
|
magic = _read(stream, len(MAGIC_BYTES))
|
||||||
if magic != MAGIC_BYTES:
|
if magic != MAGIC_BYTES:
|
||||||
raise InvalidDataError('Could not read magic bytes, '
|
raise InvalidDataError('Could not read magic bytes, '
|
||||||
'found {!r} : {}'.format(magic, magic.decode()))
|
'found {!r}'.format(magic))
|
||||||
|
Loading…
Reference in New Issue
Block a user