<p>herlesupreeth has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/17695">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cards.py: Add generic function to read EF binary to card class<br><br>This is a generic function applicable for reading EFs which doesnt require further processing<br>such as GID1, GID2 etc while decoding and also to avoid code duplication.<br><br>Change-Id: If3d8fdddb26f9776c89fd442d1d95b83e0d1476b<br>---<br>M pySim/cards.py<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/95/17695/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim/cards.py b/pySim/cards.py</span><br><span>index 495d3ee..7d3b7b4 100644</span><br><span>--- a/pySim/cards.py</span><br><span>+++ b/pySim/cards.py</span><br><span>@@ -145,6 +145,10 @@</span><br><span>            data, sw = self._scc.update_binary(EF['SPN'], rpad(content, 32))</span><br><span>             return sw</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ def read_binary(self, ef, length=None, offset=0):</span><br><span style="color: hsl(120, 100%, 40%);">+             ef_path = ef in EF and EF[ef] or ef</span><br><span style="color: hsl(120, 100%, 40%);">+           return self._scc.read_binary(ef_path, length, offset)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>      def read_gid1(self):</span><br><span>                 (res, sw) = self._scc.read_binary(EF['GID1'])</span><br><span>                if sw == '9000':</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/17695">change 17695</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/+/17695"/><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: If3d8fdddb26f9776c89fd442d1d95b83e0d1476b </div>
<div style="display:none"> Gerrit-Change-Number: 17695 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: herlesupreeth <herlesupreeth@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>