Change in pysim[master]: pySim-shell: add functionality to walk through the fs recursively

laforge gerrit-no-reply at lists.osmocom.org
Wed Mar 3 08:20:01 UTC 2021


laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/23208 )

Change subject: pySim-shell: add functionality to walk through the fs recursively
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/pysim/+/23208/1/pySim-shell.py 
File pySim-shell.py:

https://gerrit.osmocom.org/c/pysim/+/23208/1/pySim-shell.py@140 
PS1, Line 140: if f[0:2] == "DF" or f[0:3] == 'ADF':
I don't think this is safe.  The fact that today all names are following that naming scheme is a coincidence and nothing to rely on.

Shouldn't we simply use get_selectables() to get the dict of selectables as a dict with class references [instead of just the names] and then check the acutal class whether it is an instance of CardDF?   As CardADF is a derived class of CardDF it would even cover both cases.



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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If93d24dfb80c83eda39303c936910fa1fa7f48f8
Gerrit-Change-Number: 23208
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 03 Mar 2021 08:20:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210303/b0249890/attachment.htm>


More information about the gerrit-log mailing list