Skip to content

Commit

Permalink
[redhat] Fix return of function check_file_too_big()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jcastill authored and TurboTurtle committed Aug 21, 2024
1 parent a914131 commit c3b8bbc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sos/policies/distros/redhat.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,16 +441,15 @@ def check_file_too_big(self, archive):
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
from RHCP failures to the public RH dropbox
"""
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
Expand Down

0 comments on commit c3b8bbc

Please sign in to comment.