Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e89e159

Browse files
authored
Fix APPX registry key generation (GH-17489)
1 parent a1a99b4 commit e89e159

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

PC/layout/support/appxmanifest.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,17 @@ def _get_registry_entries(ns, root="", d=None):
339339
for key, value in d.items():
340340
if key == "_condition":
341341
continue
342-
elif isinstance(value, dict):
342+
if value is SPECIAL_LOOKUP:
343+
if key == "SysArchitecture":
344+
value = {
345+
"win32": "32bit",
346+
"amd64": "64bit",
347+
"arm32": "32bit",
348+
"arm64": "64bit",
349+
}[ns.arch]
350+
else:
351+
raise ValueError(f"Key '{key}' unhandled for special lookup")
352+
if isinstance(value, dict):
343353
cond = value.get("_condition")
344354
if cond and not cond(ns):
345355
continue
@@ -349,16 +359,6 @@ def _get_registry_entries(ns, root="", d=None):
349359
if len(fullkey.parts) > 1:
350360
yield str(fullkey), None, None
351361
yield from _get_registry_entries(ns, fullkey, value)
352-
elif value is SPECIAL_LOOKUP:
353-
if key == "SysArchitecture":
354-
return {
355-
"win32": "32bit",
356-
"amd64": "64bit",
357-
"arm32": "32bit",
358-
"arm64": "64bit",
359-
}[ns.arch]
360-
else:
361-
raise ValueError(f"Key '{key}' unhandled for special lookup")
362362
elif len(r.parts) > 1:
363363
yield str(r), key, value
364364

0 commit comments

Comments
 (0)