- +1 minor fix
This commit is contained in:
parent
4bf2282f18
commit
d8ebb909cb
|
|
@ -78,7 +78,11 @@ class QualtestBackend:
|
||||||
r = requests.post(url=url, json=report, timeout=utils.NETWORK_TIMEOUT)
|
r = requests.post(url=url, json=report, timeout=utils.NETWORK_TIMEOUT)
|
||||||
utils.log_verbose(f"Upload report finished. Response (probe ID): {r.content}")
|
utils.log_verbose(f"Upload report finished. Response (probe ID): {r.content}")
|
||||||
if r.status_code != 200:
|
if r.status_code != 200:
|
||||||
raise RuntimeError(f'Server returned code {r.status_code}')
|
if r.status_code == 500 and 'Duplicate entry' in r.content().decode():
|
||||||
|
# Suppose it success
|
||||||
|
result = (report['id'], True)
|
||||||
|
else:
|
||||||
|
raise RuntimeError(f'Server returned code {r.status_code}')
|
||||||
|
|
||||||
result = (r.content.decode().strip('" '), True)
|
result = (r.content.decode().strip('" '), True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue