diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2021-11-22 15:22:32 +0100 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2021-11-24 09:12:10 -0500 |
commit | 7b8bc7ac81752aba28be42de307c3fc5b2bf59fa (patch) | |
tree | 12dfe1d77a65df2d798f5c957be14a51b8aaf8d1 | |
parent | 2ec8d9103ea7c17b85b28bdc568c8b9825627211 (diff) | |
download | sos-7b8bc7ac81752aba28be42de307c3fc5b2bf59fa.tar.gz |
[policies] Deal 200 return code as success
Return code 200 of POST method request must be dealt as success.
Newly required due to the SFTP API change using POST.
Related to: #2764
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r-- | sos/policies/distros/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/policies/distros/__init__.py b/sos/policies/distros/__init__.py index 0906fa77..6f257fdc 100644 --- a/sos/policies/distros/__init__.py +++ b/sos/policies/distros/__init__.py @@ -551,7 +551,7 @@ class LinuxPolicy(Policy): r = self._upload_https_put(arc, verify) else: r = self._upload_https_post(arc, verify) - if r.status_code != 201: + if r.status_code != 200 and r.status_code != 201: if r.status_code == 401: raise Exception( "Authentication failed: invalid user credentials" |