1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 08:41:59 +00:00

Fix KeyError when build_info_data.h not in source_files_copy

Use pop(t, None) instead of pop(t) to handle case where
build_info_data.h might not be in the component resources.
This commit is contained in:
David Woodhouse
2025-12-14 08:55:25 +09:00
parent 841d9664d3
commit 4bde4dbdc8

View File

@@ -214,7 +214,7 @@ def copy_src_tree():
Path(x) for x in (DEFINES_H_TARGET, VERSION_H_TARGET, BUILD_INFO_DATA_H_TARGET)
]
for t in ignore_targets:
source_files_copy.pop(t)
source_files_copy.pop(t, None)
# Files to exclude from sources_changed tracking (generated files)
generated_files = {Path("esphome/core/build_info_data.h")}