Clarify error reporting logic in binwalk analyzer comments
This commit is contained in:
@@ -44,6 +44,8 @@ def analyze_binwalk(input_img: Path, output_dir: Path) -> None:
|
|||||||
if extracted_dir.exists():
|
if extracted_dir.exists():
|
||||||
shutil.rmtree(extracted_dir)
|
shutil.rmtree(extracted_dir)
|
||||||
|
|
||||||
|
# Only report error if stderr exists AND extraction failed.
|
||||||
|
# If zip_exist is True, binwalk worked (despite warnings), so we proceed.
|
||||||
if len(stderr) > 0 and not zip_exist:
|
if len(stderr) > 0 and not zip_exist:
|
||||||
err = {
|
err = {
|
||||||
"binwalk": {
|
"binwalk": {
|
||||||
|
|||||||
Reference in New Issue
Block a user