From c3b8bbcf7969999375d85c588c09d90d99ea41f3 Mon Sep 17 00:00:00 2001 From: Jose Castillo Date: Mon, 19 Aug 2024 11:37:08 +0100 Subject: [PATCH] [redhat] Fix return of function check_file_too_big() Fix the return of the size checks for Red Hat uploads to customer portal. Without this fix, uploads were failing silently. Signed-off-by: Jose Castillo --- sos/policies/distros/redhat.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sos/policies/distros/redhat.py b/sos/policies/distros/redhat.py index fb22c313..5b794fde 100644 --- a/sos/policies/distros/redhat.py +++ b/sos/policies/distros/redhat.py @@ -441,8 +441,7 @@ support representative. f"{convert_bytes(self._max_size_request)} " " via sos http upload. \n") ) - return RH_SFTP_HOST - return RH_API_HOST + self.upload_url = RH_SFTP_HOST def upload_archive(self, archive): """Override the base upload_archive to provide for automatic failover @@ -450,7 +449,7 @@ support representative. """ try: if self.get_upload_url().startswith(RH_API_HOST): - self.upload_url = self.check_file_too_big(archive) + self.check_file_too_big(archive) uploaded = super().upload_archive(archive) except Exception as e: uploaded = False -- 2.46.0