fix(fatfsgen): Fix incompatibility with the latest version of construct

This commit is contained in:
Roland Dobai
2024-01-10 09:47:34 +01:00
committed by BOT
parent 0717e0e4a3
commit d4d3e83d3c
2 changed files with 26 additions and 26 deletions

View File

@@ -100,7 +100,7 @@ def remove_wear_levelling_if_exists(fs_: bytes) -> bytes:
boot_sector__.parse_boot_sector(fs_)
if boot_sector__.boot_sector_state.size == len(fs_):
return fs_
except UnicodeDecodeError:
except (UnicodeDecodeError, construct.core.StringError):
pass
plain_fs: bytes = remove_wl(fs_)
return plain_fs