mirror of
https://github.com/platomav/BIOSUtilities.git
synced 2025-05-13 06:34:42 -04:00
Portwell EFI BIOS Extractor v2.0_a4
Replaced any assertions
This commit is contained in:
parent
1480d663be
commit
8d262318dd
5 changed files with 229 additions and 6 deletions
|
@ -7,7 +7,7 @@ Dell PFS Update Extractor
|
|||
Copyright (C) 2018-2022 Plato Mavropoulos
|
||||
"""
|
||||
|
||||
TITLE = 'Dell PFS Update Extractor v6.0_a8'
|
||||
TITLE = 'Dell PFS Update Extractor v6.0_a9'
|
||||
|
||||
import os
|
||||
import io
|
||||
|
@ -206,7 +206,7 @@ def is_pfs_hdr(in_buffer):
|
|||
def is_pfs_ftr(in_buffer):
|
||||
return PAT_DELL_FTR.search(in_buffer)
|
||||
|
||||
# Check if input path or buffer is Dell PFS/PKG image
|
||||
# Check if input is Dell PFS/PKG image
|
||||
def is_dell_pfs(in_file):
|
||||
in_buffer = file_to_bytes(in_file)
|
||||
|
||||
|
@ -304,7 +304,7 @@ def pfs_section_parse(zlib_data, zlib_start, output_path, pfs_name, pfs_index, p
|
|||
|
||||
# Decompress PFS ZLIB section payload
|
||||
try:
|
||||
assert not is_zlib_error # ZLIB errors are critical
|
||||
if is_zlib_error: raise Exception('ZLIB_ERROR') # ZLIB errors are critical
|
||||
section_data = zlib.decompress(compressed_data) # ZLIB decompression
|
||||
except:
|
||||
section_data = zlib_data # Fallback to raw ZLIB data upon critical error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue