<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/15495">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pySim-prog: check if CSV file exists<br><br>At the moment we do not chack if the CSV file exists at all. This may<br>lead into a crash while programming the card. Lets check the CSV file<br>before we start.<br><br>Change-Id: I2643996282d88e512c17901ab0e1181677d5dd6c<br>Related: SYS#4654<br>---<br>M pySim-prog.py<br>1 file changed, 7 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/15495/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 55634a5..a462489 100755</span><br><span>--- a/pySim-prog.py</span><br><span>+++ b/pySim-prog.py</span><br><span>@@ -708,6 +708,13 @@</span><br><span>         # Create command layer</span><br><span>       scc = SimCardCommands(transport=sl)</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+       # If we use a CSV file as data input, check if the CSV file exists.</span><br><span style="color: hsl(120, 100%, 40%);">+   print "Using CSV file as data input: " + str(opts.read_csv)</span><br><span style="color: hsl(120, 100%, 40%);">+ if opts.source == 'csv':</span><br><span style="color: hsl(120, 100%, 40%);">+              if not os.path.isfile(opts.read_csv):</span><br><span style="color: hsl(120, 100%, 40%);">+                 print "CSV file not found!"</span><br><span style="color: hsl(120, 100%, 40%);">+                 sys.exit(1)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>        # Batch mode init</span><br><span>    init_batch(opts)</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/15495">change 15495</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/+/15495"/><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: I2643996282d88e512c17901ab0e1181677d5dd6c </div>
<div style="display:none"> Gerrit-Change-Number: 15495 </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>