mirror of https://gerrit.osmocom.org/pysim
sim-rest-client: Errors are plain text, not JSON
don't try to decode JSON where there is none. Change-Id: Iafa5d1fc20b2b9ea8d9c828fc3c7e8490d0c3693
This commit is contained in:
parent
c8387dc031
commit
7a401a24bb
|
@ -128,6 +128,9 @@ def main(argv):
|
|||
req_json = {'rand': rand.hex(), 'autn': t['autn'].hex()}
|
||||
print("-> %s" % req_json)
|
||||
resp = rest_post('/slot/%u' % args.slot_nr, req_json)
|
||||
if not resp.ok:
|
||||
print("<- ERROR %u: %s" % (resp.status_code, resp.text))
|
||||
break
|
||||
resp_json = resp.json()
|
||||
print("<- %s" % resp_json)
|
||||
if 'synchronisation_failure' in resp_json:
|
||||
|
|
Loading…
Reference in New Issue