[Python-checkins] Fix APPX registry key generation (GH-17489)

Steve Dower webhook-mailer at python.org
Mon Dec 9 11:43:20 EST 2019


https://github.com/python/cpython/commit/e89e159b18cc9f32a0a4a818d080eb6a63d888a7
commit: e89e159b18cc9f32a0a4a818d080eb6a63d888a7
branch: master
author: Steve Dower <steve.dower at python.org>
committer: GitHub <noreply at github.com>
date: 2019年12月09日T08:43:13-08:00
summary:
Fix APPX registry key generation (GH-17489)
files:
M PC/layout/support/appxmanifest.py
diff --git a/PC/layout/support/appxmanifest.py b/PC/layout/support/appxmanifest.py
index 9e008f793cf55..9a7439d027126 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
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /