laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37889?usp=email )
Change subject: runtime: fix get_file_by_name ......................................................................
runtime: fix get_file_by_name
The method get_file_by_name compares the selectable directly with the given file name. This is not correct. The comparison should be with the path element from the pathlist.
Related: OS#6092 Change-Id: Id2d0704678935d9b9e2f1aeb6eaccbff6fa9d429 --- M pySim/runtime.py 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/pySim/runtime.py b/pySim/runtime.py index 5ffbee6..a813e6d 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -256,11 +256,11 @@
for p in pathlist: # Look for the next file in the path list - selectables = file.get_selectables().items() + selectables = file.get_selectables() file = None for selectable in selectables: - if selectable[1].name == name: - file = selectable[1] + if selectable == p: + file = selectables[selectable] break
# When we hit none, then the given path must be invalid