<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/26084">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sim-rest-client: Errors are plain text, not JSON<br><br>don't try to decode JSON where there is none.<br><br>Change-Id: Iafa5d1fc20b2b9ea8d9c828fc3c7e8490d0c3693<br>---<br>M contrib/sim-rest-client.py<br>1 file changed, 3 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/84/26084/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/contrib/sim-rest-client.py b/contrib/sim-rest-client.py</span><br><span>index 8f74adc..512765b 100755</span><br><span>--- a/contrib/sim-rest-client.py</span><br><span>+++ b/contrib/sim-rest-client.py</span><br><span>@@ -128,6 +128,9 @@</span><br><span>         req_json = {'rand': rand.hex(), 'autn': t['autn'].hex()}</span><br><span>         print("-> %s" % req_json)</span><br><span>         resp = rest_post('/slot/%u' % args.slot_nr, req_json)</span><br><span style="color: hsl(120, 100%, 40%);">+        if not resp.ok:</span><br><span style="color: hsl(120, 100%, 40%);">+            print("<- ERROR %u: %s" % (resp.status_code, resp.text))</span><br><span style="color: hsl(120, 100%, 40%);">+            break</span><br><span>         resp_json = resp.json()</span><br><span>         print("<- %s" % resp_json)</span><br><span>         if 'synchronisation_failure' in resp_json:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/26084">change 26084</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/+/26084"/><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: Iafa5d1fc20b2b9ea8d9c828fc3c7e8490d0c3693 </div>
<div style="display:none"> Gerrit-Change-Number: 26084 </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>