<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/18172">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">utils: fix list comprehension in h2s(): ignore upper case padding<br><br>By definition, h2s() is supposed to skip padding in the given<br>hexstring, so it was working fine for 'ff', but not for 'FF'.<br><br>Change-Id: I2c5d72a0f7f2796115116737f9f7b5299021f6a3<br>Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com><br>---<br>M pySim/utils.py<br>1 file changed, 2 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/72/18172/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim/utils.py b/pySim/utils.py</span><br><span>index 1980685..6c4bee0 100644</span><br><span>--- a/pySim/utils.py</span><br><span>+++ b/pySim/utils.py</span><br><span>@@ -35,7 +35,8 @@</span><br><span>  return ''.join(['%02x'%(x) for x in s])</span><br><span> </span><br><span> def h2s(s):</span><br><span style="color: hsl(0, 100%, 40%);">-      return ''.join([chr((int(x,16)<<4)+int(y,16)) for x,y in zip(s[0::2], s[1::2]) if not (x == 'f' and y == 'f') ])</span><br><span style="color: hsl(120, 100%, 40%);">+        return ''.join([chr((int(x,16)<<4)+int(y,16)) for x,y in zip(s[0::2], s[1::2])</span><br><span style="color: hsl(120, 100%, 40%);">+                                                if int(x + y, 16) != 0xff])</span><br><span> </span><br><span> def s2h(s):</span><br><span>         return b2h(s)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/18172">change 18172</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/+/18172"/><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: I2c5d72a0f7f2796115116737f9f7b5299021f6a3 </div>
<div style="display:none"> Gerrit-Change-Number: 18172 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>