runtime: explain why we may access the card object directly

When we are in the constructor of RuntimeState, we may/must access the
card object directly. Let's explain why, since it may not be immediately
obvious.

Change-Id: I01f74d5f021d46679d1c9fa83fb8753382b0f88f
Related: OS#5418
This commit is contained in:
Philipp Maier 2023-12-07 11:07:55 +01:00
parent b8b61bf8af
commit e30456b07a
1 changed files with 6 additions and 0 deletions

View File

@ -110,6 +110,12 @@ class RuntimeState:
# probe for those applications
for f in sorted(set(apps_profile) - set(apps_taken), key=str):
try:
# we can not use the lchan provided methods select, or select_file
# since those method work on an already finished file model. At
# this point we are still in the initialization process, so it is
# no problem when we access the card object directly without caring
# about updating other states. For normal selects at runtime, the
# caller must use the lchan provided methods select or select_file!
data, sw = self.card.select_adf_by_aid(f.aid)
self.selected_adf = f
if sw == "9000":