<p style="white-space: pre-wrap; word-wrap: break-word;">The patch looks a lot better now, thanks! Just a few minor things...</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/26165">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/pysim/+/26165/6/pySim/profile.py">File pySim/profile.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/+/26165/6/pySim/profile.py@52">Patch Set #6, Line 52:</a> <code style="font-family:monospace,monospace">match_sim</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I still don't like this code duplication. Both functions are basically doing the same thing: trying to select '3f00' using the given CLA/SEL bytes. I suggest to add a more generic method to CardProfile and call it e.g. try_select_3f00() or so. Then in child classes you could use it this way:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> if self.try_select_3f00(): # will use self.cla and self.sel_ctrl</pre><p style="white-space: pre-wrap; word-wrap: break-word;">or even this way in CardProfileUICCSIM:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> if self.try_select_3f00() and self.try_select_3f00(sel_ctrl='0000'):</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/26165/6/pySim/profile.py@154">Patch Set #6, Line 154:</a> <code style="font-family:monospace,monospace">key=operator.attrgetter('order')</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Alternatively: key=lambda cls: cls.order</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/pysim/+/26165/6/pySim/ts_102_221.py">File pySim/ts_102_221.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/+/26165/6/pySim/ts_102_221.py@615">Patch Set #6, Line 615:</a> <code style="font-family:monospace,monospace">order</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Cosmetic: class properties are usually upper case.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/26165">change 26165</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/+/26165"/><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: If090d32551145f75c644657b90085a3ef5bfa691 </div>
<div style="display:none"> Gerrit-Change-Number: 26165 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </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: daniel <dwillmann@sysmocom.de> </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: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 16 Nov 2021 17:38:50 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>