diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2022-03-13 21:58:06 +0100 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2022-03-14 10:58:55 -0400 |
commit | 9d99799317b6776e60c982162166f355309213b7 (patch) | |
tree | 11d82fbdfe9bad95afd564d2b11ad0f63283368c | |
parent | 47465338a510b05a4104deb68e9b209391ea37bd (diff) | |
download | sos-9d99799317b6776e60c982162166f355309213b7.tar.gz |
[distros] Fix broken upload due to 1bcb449
Commit 1bcb449 needs to be enhanced to test if self.upload_url has been
already set. Otherwise, 'NoneType' object has no attribute 'startswith'
is raised.
Resolves: #2879
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r-- | sos/policies/distros/redhat.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/policies/distros/redhat.py b/sos/policies/distros/redhat.py index 857b84d5..d1138301 100644 --- a/sos/policies/distros/redhat.py +++ b/sos/policies/distros/redhat.py @@ -377,7 +377,7 @@ support representative. from RHCP failures to the public RH dropbox """ try: - if self.upload_url.startswith(RH_API_HOST) and \ + if self.upload_url and self.upload_url.startswith(RH_API_HOST) and\ (not self.get_upload_user() or not self.get_upload_password()): self.upload_url = RH_SFTP_HOST uploaded = super(RHELPolicy, self).upload_archive(archive) |