Change in pysim[master]: cards:FairwavesSIM: force SIM APDUs during programming

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Thu May 6 18:49:45 UTC 2021


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

Change subject: cards:FairwavesSIM: force SIM APDUs during programming
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/c/pysim/+/24139/1/pySim/cards.py 
File pySim/cards.py:

https://gerrit.osmocom.org/c/pysim/+/24139/1/pySim/cards.py@a1014 
PS1, Line 1014: 
unrelated ws change (I wish we had some git commit hook warning about that)


https://gerrit.osmocom.org/c/pysim/+/24139/1/pySim/cards.py@1103 
PS1, Line 1103: 			raise ValueError("Please provide a PIN-ADM as there is no default one")
If an exception happens, then you never reach the end of function and thus never revert your USIM->SIM protocol change. I suggest to rename the original method to '_program', and add a 'program' wrapper that would basically do:

  def program(self, p):
    # Change from USIM to SIM
    try:
      self._program(p)
    finally:
      # restore original cla byte and sel ctrl



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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I8f02625d2b620ecdf4b2afc27a8750119b707152
Gerrit-Change-Number: 24139
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Thu, 06 May 2021 18:49:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210506/8e84bd93/attachment.htm>


More information about the gerrit-log mailing list