<p>Ludovic Rousseau has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-sim-auth/+/20904">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">card/SIM: use integer division<br><br> [(Data[18] & 0x80) / 0x80]\<br>TypeError: tuple indices must be integers or slices, not float<br><br>Change-Id: I38cafd941e230cbfc84a25d2317e90778d7e124f<br>---<br>M card/SIM.py<br>1 file changed, 4 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-sim-auth refs/changes/04/20904/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/card/SIM.py b/card/SIM.py</span><br><span>index e783747..78864a7 100644</span><br><span>--- a/card/SIM.py</span><br><span>+++ b/card/SIM.py</span><br><span>@@ -182,16 +182,16 @@</span><br><span> fil['EF_num'] = Data[15]</span><br><span> fil['codes_num'] = Data[16]</span><br><span> fil['CHV1'] = ('not initialized','initialized')\</span><br><span style="color: hsl(0, 100%, 40%);">- [(Data[18] & 0x80) / 0x80]\</span><br><span style="color: hsl(120, 100%, 40%);">+ [(Data[18] & 0x80) // 0x80]\</span><br><span> + ': %d attempts remain' % (Data[18] & 0x0F)</span><br><span> fil['unblock_CHV1'] = ('not initialized','initialized')\</span><br><span style="color: hsl(0, 100%, 40%);">- [(Data[19] & 0x80) / 0x80]\</span><br><span style="color: hsl(120, 100%, 40%);">+ [(Data[19] & 0x80) // 0x80]\</span><br><span> + ': %d attempts remain' % (Data[19] & 0x0F)</span><br><span> fil['CHV2'] = ('not initialized','initialized')\</span><br><span style="color: hsl(0, 100%, 40%);">- [(Data[20] & 0x80) / 0x80]\</span><br><span style="color: hsl(120, 100%, 40%);">+ [(Data[20] & 0x80) // 0x80]\</span><br><span> + ': %d attempts remain' % (Data[20] & 0x0F)</span><br><span> fil['unblock_CHV2'] = ('not initialized','initialized')\</span><br><span style="color: hsl(0, 100%, 40%);">- [(Data[21] & 0x80) / 0x80]\</span><br><span style="color: hsl(120, 100%, 40%);">+ [(Data[21] & 0x80) // 0x80]\</span><br><span> + ': %d attempts remain' % (Data[21] & 0x0F)</span><br><span> if len(Data) > 23: </span><br><span> fil['Adm'] = Data[23:]</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-sim-auth/+/20904">change 20904</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/osmo-sim-auth/+/20904"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: osmo-sim-auth </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I38cafd941e230cbfc84a25d2317e90778d7e124f </div>
<div style="display:none"> Gerrit-Change-Number: 20904 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Ludovic Rousseau <ludovic.rousseau+osmocom@free.fr> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>