Skip to content

Commit 4473192

Browse files
committed
gh-136264: Fix PEP-739 build-details generation with relative-paths
1 parent 48cb9b6 commit 4473192

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tools/build/generate-build-details.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,12 @@ def make_paths_relative(data: dict[str, Any], config_path: str | None = None) ->
149149
try:
150150
container = data
151151
for part in parent.split('.'):
152-
container = container[part]
152+
if part:
153+
if part not in container:
154+
raise KeyError(part)
155+
container = container[part]
156+
if child not in container:
157+
raise KeyError(part)
153158
current_path = container[child]
154159
except KeyError:
155160
continue

0 commit comments

Comments
 (0)