From 4ea648307ec3cc7efc5ef57ad4f615b44dc650c2 Mon Sep 17 00:00:00 2001 From: "Christian M. Adams" Date: Wed, 26 Aug 2020 18:20:53 -0400 Subject: [PATCH] Accept all responses <300 from Insights API --- awx/main/analytics/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/main/analytics/core.py b/awx/main/analytics/core.py index 3ff61b82f9..bab62b4a3c 100644 --- a/awx/main/analytics/core.py +++ b/awx/main/analytics/core.py @@ -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()