From a64f2726d03a8ef4ef5a8f1903efc27c8c6bca6a Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Wed, 21 Jul 2021 01:10:33 -0700 Subject: [PATCH] Don't attempt to decode magic bytes Since they're wrong, they're likely not decodable anyways. --- fatamorgana/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fatamorgana/basic.py b/fatamorgana/basic.py index 2176cb5..898ce96 100644 --- a/fatamorgana/basic.py +++ b/fatamorgana/basic.py @@ -2230,4 +2230,4 @@ def read_magic_bytes(stream: io.BufferedIOBase): magic = _read(stream, len(MAGIC_BYTES)) if magic != MAGIC_BYTES: raise InvalidDataError('Could not read magic bytes, ' - 'found {!r} : {}'.format(magic, magic.decode())) + 'found {!r}'.format(magic))