mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
pySim.runtime: Fix file selection by upper case hex FID
When trying to remove a file (e.g. DF.5G_ProSe, 5FF0), there seems to be a case sensitive check when checking for the dict: pySim/runtime.py: get_file_for_filename(): 478 def get_file_for_filename(self, name: str): 479 """Get the related CardFile object for a specified filename.""" 480 sels = self.selected_file.get_selectables() 481 return sels[name] The dict sels contains 5ff0, but not 5FF0. The type of argument name is str. So a case sensitive check will be used. Change-Id: Idd0db1f4bbd3ee9eec20f5fd0f4371c2882950cd Closes: OS#6898
This commit is contained in:
@@ -477,11 +477,15 @@ class RuntimeLchan:
|
||||
|
||||
def get_file_for_filename(self, name: str):
|
||||
"""Get the related CardFile object for a specified filename."""
|
||||
if is_hex(name):
|
||||
name = name.lower()
|
||||
sels = self.selected_file.get_selectables()
|
||||
return sels[name]
|
||||
|
||||
def activate_file(self, name: str):
|
||||
"""Request ACTIVATE FILE of specified file."""
|
||||
if is_hex(name):
|
||||
name = name.lower()
|
||||
sels = self.selected_file.get_selectables()
|
||||
f = sels[name]
|
||||
data, sw = self.scc.activate_file(f.fid)
|
||||
|
||||
Reference in New Issue
Block a user