mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-22 09:33:29 +08:00
Guard against None base_dir in _collect_output_absolute_paths
Some checks failed
Python Linting / Run Ruff (push) Waiting to run
Python Linting / Run Pylint (push) Waiting to run
Build package / Build Test (3.10) (push) Has been cancelled
Build package / Build Test (3.11) (push) Has been cancelled
Build package / Build Test (3.12) (push) Has been cancelled
Build package / Build Test (3.13) (push) Has been cancelled
Build package / Build Test (3.14) (push) Has been cancelled
Some checks failed
Python Linting / Run Ruff (push) Waiting to run
Python Linting / Run Pylint (push) Waiting to run
Build package / Build Test (3.10) (push) Has been cancelled
Build package / Build Test (3.11) (push) Has been cancelled
Build package / Build Test (3.12) (push) Has been cancelled
Build package / Build Test (3.13) (push) Has been cancelled
Build package / Build Test (3.14) (push) Has been cancelled
Return early with an empty list when folder_paths.get_directory_by_type('output')
returns None to avoid os.path.join(None, ...) producing invalid paths.
Amp-Thread-ID: https://ampcode.com/threads/T-019cfbe5-dffc-760a-9a37-9b041dd71e73
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
parent
8973162def
commit
ca661150ad
2
main.py
2
main.py
@ -245,6 +245,8 @@ def _collect_output_absolute_paths(history_result: dict) -> list[str]:
|
|||||||
"""Extract absolute file paths for output items from a history result."""
|
"""Extract absolute file paths for output items from a history result."""
|
||||||
paths = []
|
paths = []
|
||||||
base_dir = folder_paths.get_directory_by_type("output")
|
base_dir = folder_paths.get_directory_by_type("output")
|
||||||
|
if base_dir is None:
|
||||||
|
return paths
|
||||||
for node_output in history_result.get("outputs", {}).values():
|
for node_output in history_result.get("outputs", {}).values():
|
||||||
for items in node_output.values():
|
for items in node_output.values():
|
||||||
if not isinstance(items, list):
|
if not isinstance(items, list):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user