<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/15498">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pySim-prog: use case insensitive CSV headers.<br><br>Inside of pySim all CSV headers are defined in lower case and are<br>evaluated case sensitive. This means that a CSV file that contains the<br>headers in uppercase for example will not parse. Lets make sure that the<br>CSV headers are evaluated case insensitive to increase compatibility<br>with slightly different formats.<br><br>Change-Id: I1a476e7fc521d1aad2956feec3db196156961d20<br>---<br>M pySim-prog.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/98/15498/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim-prog.py b/pySim-prog.py</span><br><span>index 974dbd1..a24cd1a 100755</span><br><span>--- a/pySim-prog.py</span><br><span>+++ b/pySim-prog.py</span><br><span>@@ -457,6 +457,10 @@</span><br><span>      import csv</span><br><span>   f = open(opts.read_csv, 'r')</span><br><span>         cr = csv.DictReader(f)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        # Lower-case fieldnames</span><br><span style="color: hsl(120, 100%, 40%);">+        cr.fieldnames = [ field.lower() for field in cr.fieldnames ]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    i = 0</span><br><span>         if not 'iccid' in cr.fieldnames:</span><br><span>             raise Exception("CSV file in wrong format!")</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/15498">change 15498</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/+/15498"/><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: I1a476e7fc521d1aad2956feec3db196156961d20 </div>
<div style="display:none"> Gerrit-Change-Number: 15498 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>