laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/28765 
)

Change subject: filesystem.py: Make CardDF.get_selectables() respect the flags
......................................................................

filesystem.py: Make CardDF.get_selectables() respect the flags

All other get_selectables() understand a flag like 'FIDS' to request
only the hexadecimal FIDs and not the file names.  However, the
CardEF.get_selectables() ignored those flags and unconditionally
returned the names.

Change-Id: Icdc37cae3eecd36d167da76c30224b9d48c844fd
---
M pySim/filesystem.py
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 598121b..886a48d 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -541,8 +541,10 @@
         """
         # global selectable names + those of the parent DF
         sels = super().get_selectables(flags)
-        sels.update(
-            {x.name: x for x in self.parent.children.values() if x != self})
+        if flags == [] or 'FIDS' in flags:
+            sels.update({x.fid: x for x in self.parent.children.values() if 
x.fid and x != self})
+        if flags == [] or 'FNAMES' in flags:
+            sels.update({x.name: x for x in self.parent.children.values() if 
x.name and x != self})
         return sels



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28765
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Icdc37cae3eecd36d167da76c30224b9d48c844fd
Gerrit-Change-Number: 28765
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged

Reply via email to