<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1:</p><p style="white-space: pre-wrap; word-wrap: break-word;">I think the problem with this is that the exit() code of the program now is always "success" (0) even if there were any errors.  This is very dangerous if you use some scripts to determine success/failure of the programming operation.</p><p style="white-space: pre-wrap; word-wrap: break-word;">If we go your approach, then we need to make sure that if any exceptions were raised, we need to memorize that and terminate the program with an error exit code.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Also, any error messages should always be printed to stderr, not to stdout (which you are doing here).  Either change to stderr, or maybe consider introducing the general python logging framework here, which should hopefully make sure error-level messages are actually printed to stderr.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Thats true, I had not thought about it from the perspective of using a script for programming. I will change it to print to stderr which seems to be the most simplest and straightforward solution. </p><p><a href="https://gerrit.osmocom.org/c/pysim/+/20313">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/20313">change 20313</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/+/20313"/><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: I5a200e0594dc29cb6fdaf8966f4a11adeddcd80f </div>
<div style="display:none"> Gerrit-Change-Number: 20313 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: herlesupreeth <herlesupreeth@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: herlesupreeth <herlesupreeth@gmail.com> </div>
<div style="display:none"> Gerrit-CC: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 02 Oct 2020 07:52:27 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>