summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-12-09 17:02:22 (GMT)
committerGitHub <noreply@github.com>2019-12-09 17:02:22 (GMT)
commitc5a2a974d3608810dc0b06b46876542e1216f7e6 (patch)
treed7c86961463b1d8ff0d433c407730fe267e08bb9 /PC
parent0d57db27f2c563b6433a220b646b50bdeff8a1f2 (diff)
downloadcpython-c5a2a974d3608810dc0b06b46876542e1216f7e6.zip
cpython-c5a2a974d3608810dc0b06b46876542e1216f7e6.tar.gz
cpython-c5a2a974d3608810dc0b06b46876542e1216f7e6.tar.bz2
Fix APPX registry key generation (GH-17489)
(cherry picked from commit e89e159b18cc9f32a0a4a818d080eb6a63d888a7) Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'PC')
-rw-r--r--PC/layout/support/appxmanifest.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/PC/layout/support/appxmanifest.py b/PC/layout/support/appxmanifest.py
index 9e008f7..9a7439d 100644
--- a/PC/layout/support/appxmanifest.py
+++ b/PC/layout/support/appxmanifest.py
@@ -339,7 +339,17 @@ def _get_registry_entries(ns, root="", d=None):
for key, value in d.items():
if key == "_condition":
continue
- elif isinstance(value, dict):
+ if value is SPECIAL_LOOKUP:
+ if key == "SysArchitecture":
+ value = {
+ "win32": "32bit",
+ "amd64": "64bit",
+ "arm32": "32bit",
+ "arm64": "64bit",
+ }[ns.arch]
+ else:
+ raise ValueError(f"Key '{key}' unhandled for special lookup")
+ if isinstance(value, dict):
cond = value.get("_condition")
if cond and not cond(ns):
continue
@@ -349,16 +359,6 @@ def _get_registry_entries(ns, root="", d=None):
if len(fullkey.parts) > 1:
yield str(fullkey), None, None
yield from _get_registry_entries(ns, fullkey, value)
- elif value is SPECIAL_LOOKUP:
- if key == "SysArchitecture":
- return {
- "win32": "32bit",
- "amd64": "64bit",
- "arm32": "32bit",
- "arm64": "64bit",
- }[ns.arch]
- else:
- raise ValueError(f"Key '{key}' unhandled for special lookup")
elif len(r.parts) > 1:
yield str(r), key, value