1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-29 20:55:32 +03:00

Accept all responses <300 from Insights API

This commit is contained in:
Christian M. Adams 2020-08-26 18:20:53 -04:00
parent 1514a5ac23
commit 4ea648307e

View File

@ -180,7 +180,8 @@ def ship(path):
auth=(rh_user, rh_password),
headers=s.headers,
timeout=(31, 31))
if response.status_code != 202:
# Accept 2XX status_codes
if response.status_code >= 300:
return logger.exception('Upload failed with status {}, {}'.format(response.status_code,
response.text))
run_now = now()