Skip to content

Commit

Permalink
filesystem.py: Make CardDF.get_selectables() respect the flags
Browse files Browse the repository at this point in the history
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
  • Loading branch information
laf0rge committed Jul 24, 2022
1 parent 86d698d commit d2c177b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pySim/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,10 @@ def get_selectables(self, flags=[]) -> dict:
"""
# 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


Expand Down

0 comments on commit d2c177b

Please sign in to comment.