<p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/c/pysim/+/24139">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/pysim/+/24139/1/pySim/cards.py">File pySim/cards.py:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24139/1/pySim/cards.py@a1014">Patch Set #1, Line 1014:</a> <code style="font-family:monospace,monospace"></code></p><p style="white-space: pre-wrap; word-wrap: break-word;">unrelated ws change (I wish we had some git commit hook warning about that)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24139/1/pySim/cards.py@1103">Patch Set #1, Line 1103:</a> <code style="font-family:monospace,monospace">                      raise ValueError("Please provide a PIN-ADM as there is no default one")</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">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:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  def program(self, p):<br>    # Change from USIM to SIM<br>    try:<br>      self._program(p)<br>    finally:<br>      # restore original cla byte and sel ctrl</pre></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/24139">change 24139</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/pysim/+/24139"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I8f02625d2b620ecdf4b2afc27a8750119b707152 </div>
<div style="display:none"> Gerrit-Change-Number: 24139 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 06 May 2021 18:49:45 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>