diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2020-09-24 10:17:25 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-10-07 13:55:20 -0400 |
commit | 11cc6f478a9b41ce81b5b74faab5ca42930262ee (patch) | |
tree | a36be14033719fcce0cf72933029807fbcb4e05f | |
parent | a3b493a8accc338158faa53b9e221067323b75f5 (diff) | |
download | sos-11cc6f478a9b41ce81b5b74faab5ca42930262ee.tar.gz |
[policy] Use user-provided FTP directory if specified
Fixes an issue whereby we ignore a user-provided FTP directory.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/policies/__init__.py | 2 | ||||
-rw-r--r-- | sos/policies/redhat.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py index 215739bd..32f271d9 100644 --- a/sos/policies/__init__.py +++ b/sos/policies/__init__.py @@ -1677,7 +1677,7 @@ class LinuxPolicy(Policy): password = self.get_upload_password() if not directory: - directory = self._upload_directory + directory = self.upload_directory or self._upload_directory try: session = ftplib.FTP(url, user, password) diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py index f2f847a5..d079406f 100644 --- a/sos/policies/redhat.py +++ b/sos/policies/redhat.py @@ -332,7 +332,8 @@ support representative. if not self.case_id: # Cannot use the RHCP. Use anonymous dropbox self.upload_user = self._upload_user - self.upload_directory = self._upload_directory + if self.upload_directory is None: + self.upload_directory = self._upload_directory self.upload_password = None return RH_FTP_HOST else: |