fix(jnpf-browser-automation): guard USER_END_MAP 缺条目 — clear error msg
Code review I-1: prevent silent KeyError when adding 11th control. Co-Authored-By: Claude <[email protected]>
This commit is contained in:
1 parent
4889c4a7ba
commit
120d07d889
1 file changed
+2
@@ -62,6 +62,8 @@ USER_END_MAP = {
|
||||
def build_controls() -> dict:
|
||||
controls = []
|
||||
for jnpfKey, label, fieldName, fieldLabel, fillValue, configSchema in CONTROLS_DEF:
|
||||
if jnpfKey not in USER_END_MAP:
|
||||
raise SystemExit(f"✗ USER_END_MAP 缺条目: {jnpfKey}")
|
||||
ue = {**USER_END_MAP[jnpfKey], "fillValue": fillValue}
|
||||
controls.append({
|
||||
"jnpfKey": jnpfKey,
|
||||
|
||||
Reference in new issue
Block a user