<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/26370">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">fix: Decoder may raise KeyError<br><br>This fixes an issue where a KeyError may be raised when 'A5'<br>is not present in `fcp`<br><br>Change-Id: I5bb6131bd76c7bae2a70034c429cae2b380d164f<br>---<br>M pySim/ts_102_221.py<br>1 file changed, 1 insertion(+), 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/70/26370/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py</span><br><span>index adb40c1..f145d19 100644</span><br><span>--- a/pySim/ts_102_221.py</span><br><span>+++ b/pySim/ts_102_221.py</span><br><span>@@ -684,7 +684,7 @@</span><br><span>         fcp_tlv = TLV(FCP_TLV_MAP)</span><br><span>         fcp = fcp_tlv.parse(fcp_base['62'])</span><br><span>         # further decode the proprietary information</span><br><span style="color: hsl(0, 100%, 40%);">-        if fcp['A5']:</span><br><span style="color: hsl(120, 100%, 40%);">+        if 'A5' in fcp:</span><br><span>             prop_tlv = TLV(FCP_Proprietary_TLV_MAP)</span><br><span>             prop = prop_tlv.parse(fcp['A5'])</span><br><span>             fcp['A5'] = tlv_val_interpret(FCP_prorietary_interpreter_map, prop)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/26370">change 26370</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/+/26370"/><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: I5bb6131bd76c7bae2a70034c429cae2b380d164f </div>
<div style="display:none"> Gerrit-Change-Number: 26370 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>