allow more response codes

This commit is contained in:
pedro 2024-10-10 19:09:44 +02:00
parent 46447cebaa
commit 47a8e24850
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ def send_snapshot_to_devicehub(snapshot, token, url):
}
try:
response = requests.post(url, data=json.dumps(snapshot), headers=headers)
if response.status_code == 200:
if 200 <= response.status_code < 300:
print(f"workbench: INFO: Snapshot successfully sent to '{url}'")
else:
txt = "workbench: ERROR: Failed to send snapshot. HTTP {}: {}".format(