This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/26165 ) Change subject: pySim-shell: add method to match card profile to card ...................................................................... Patch Set 6: (8 comments) https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim-shell.py File pySim-shell.py: https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim-shell.py@101 PS5, Line 101: if type(profile) is CardProfileUICC or type(profile) is CardProfileUICCSIM: > In terms of readability, this is a better approach: […] Done https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim/filesystem.py File pySim/filesystem.py: https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim/filesystem.py@1508 PS5, Line 1508: that is overloaded by specific dirived classes > If I understand correctly, this is an *abstract* static method. […] Done https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim/profile.py File pySim/profile.py: https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim/profile.py@29 PS5, Line 29: # In order for autodetection ... > So AFAIU, the order is important here. And this is why you're not using __subclasses__(). Yes. You must first test for UICCSIM, then for UICC (without SIM) and the you can test for SIM. For example: When you test for SIM first, then you would e.g. recognize an UICCSIM as plain old SIM (which would even work, as they are compatible, but you would not be able to access its UICC features.) https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim/profile.py@32 PS5, Line 32: def profile_detect(scc:SimCardCommands): > Missing type definition for returned value: […] Done https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim/profile.py@32 PS5, Line 32: profile_detect > I find it confusing that you create a new module called 'profile', which itself does not define clas […] My plan was to implement it with a staticmethod, but I ran into problems with circular imports. I have tried it now again. Thanks to all_subcluasses function you provided it is not necessary to import the subclasses, so I managed to get around the problems and it worked this time. https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim/profile.py@33 PS5, Line 33: > ws Done https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim/ts_102_221.py File pySim/ts_102_221.py: https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim/ts_102_221.py@631 PS5, Line 631: _match_sim > So this is basically a copy of CardProfileSIM.match_with_card()? […] Done https://gerrit.osmocom.org/c/pysim/+/26165/5/pySim/ts_102_221.py@746 PS5, Line 746: # Add GSM specific files > tabs vs spaces There is a huge problem with tabs vs spaces in this project. Someone created parts with an editor that used 4 space wide tabs. I wonder if there is some tool like indent for python out there. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/26165 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: If090d32551145f75c644657b90085a3ef5bfa691 Gerrit-Change-Number: 26165 Gerrit-PatchSet: 6 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: osmith <osmith at sysmocom.de> Gerrit-Comment-Date: Tue, 16 Nov 2021 14:54:57 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy at sysmocom.de> Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211116/d63c6b83/attachment.htm>