Fix Manage Kits for apps read from a device
The schema built from a Sox session spelled checksums as signed decimals, so no kit matched a manifest: Installed showed raw checksums and Action read "Keep at checksum ...". They are now 8 hex digits like a .sax file, and checksums compare regardless of zero-padding. A device session only loads folders as they are opened, so only sys counted as used. Used kits now come from the whole component tree, read one request at a time so a small controller is not flooded into dropping the session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+12
@@ -501,6 +501,18 @@ def used_kit_names():
|
||||
if app_state.xml_root_element is None:
|
||||
return names
|
||||
|
||||
# A device session's DOM only holds the folders opened so far.
|
||||
session = app_state.device_session
|
||||
if session is not None and session.is_connected:
|
||||
try:
|
||||
return session.used_kit_names()
|
||||
except Exception as error:
|
||||
messagebox.showwarning(
|
||||
"Kits",
|
||||
f"Could not read every component from the device:\n{error}\n\n"
|
||||
"Kits shown as used come only from the folders opened so far.",
|
||||
)
|
||||
|
||||
for comp in app_state.xml_root_element.iter("comp"):
|
||||
type_str = comp.get("type") or ""
|
||||
if "::" in type_str:
|
||||
|
||||
Reference in New Issue
Block a user