runtime: fix tracking of selected_adf

The class property selected_adf is not updated in all locations where an
ADF is selected, this means that we may loose track of the currently
selected ADF in some locations

Change-Id: I4cc0c58ff887422b4f3954d35c8380ddc00baa1d
Related: OS#5418
This commit is contained in:
Philipp Maier
2023-10-25 18:02:41 +02:00
committed by laforge
parent 8fab463e67
commit 578cf12e73

View File

@@ -111,6 +111,7 @@ class RuntimeState:
for f in sorted(set(apps_profile) - set(apps_taken), key=str):
try:
data, sw = self.card.select_adf_by_aid(f.aid)
self.selected_adf = f
if sw == "9000":
print(" %s: %s" % (f.name, f.aid))
apps_taken.append(f)
@@ -344,6 +345,7 @@ class RuntimeLchan:
try:
if isinstance(f, CardADF):
(data, sw) = self.rs.card.select_adf_by_aid(f.aid, scc=self.scc)
self.selected_adf = f
else:
(data, sw) = self.scc.select_file(f.fid)
self.selected_file = f