aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/policies/__init__.py6
-rw-r--r--sos/policies/redhat.py8
2 files changed, 10 insertions, 4 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index 9a1aac07..215739bd 100644
--- a/sos/policies/__init__.py
+++ b/sos/policies/__init__.py
@@ -1420,7 +1420,8 @@ class LinuxPolicy(Policy):
"""Should be overridden by policies to determine if a password needs to
be provided for upload or not
"""
- if not self.get_upload_password() and self.get_upload_user():
+ if not self.get_upload_password() and (self.get_upload_user() !=
+ self._upload_user):
msg = ("Please provide the upload password for %s: "
% self.get_upload_user())
self.upload_password = getpass(msg)
@@ -1472,7 +1473,8 @@ class LinuxPolicy(Policy):
Print a more human-friendly string than vendor URLs
"""
self.upload_archive = archive
- self.upload_url = self.get_upload_url()
+ if not self.upload_url:
+ self.upload_url = self.get_upload_url()
if not self.upload_url:
raise Exception("No upload destination provided by policy or by "
"--upload-url")
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
index 34b421f3..f2f847a5 100644
--- a/sos/policies/redhat.py
+++ b/sos/policies/redhat.py
@@ -320,12 +320,16 @@ support representative.
"Enter your Red Hat Customer Portal username (empty to use "
"public dropbox): ")
)
+ if not self.upload_user:
+ self.upload_url = RH_FTP_HOST
+ self.upload_user = self._upload_user
def get_upload_url(self):
+ if self.upload_url:
+ return self.upload_url
if self.commons['cmdlineopts'].upload_url:
return self.commons['cmdlineopts'].upload_url
- if (not self.case_id or not self.get_upload_user() or not
- self.get_upload_password()):
+ if not self.case_id:
# Cannot use the RHCP. Use anonymous dropbox
self.upload_user = self._upload_user
self.upload_directory = self._upload_directory