aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2024-01-08 09:01:47 +0100
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2024-01-08 10:03:12 -0500
commitd43b1e0651f179f11213e4aa57bcae457d6dc664 (patch)
treeb8aef48381cbbd08d8aabbdba3e905d2b5765aaf
parentd9aa743d2b0e4c4cf07bbd88fb0bf957e3a28cef (diff)
downloadsos-d43b1e0651f179f11213e4aa57bcae457d6dc664.tar.gz
[collect] Imply --upload when --upload-url is set
Setting --upload-url should imply uploading the tarball at the end, regardless of --upload is explicitly set or not. The same is already in place for "sos report", so let unify it. Resolves: #3464 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/collector/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/collector/__init__.py b/sos/collector/__init__.py
index ae316755..3fc75661 100644
--- a/sos/collector/__init__.py
+++ b/sos/collector/__init__.py
@@ -1270,7 +1270,7 @@ this utility or remote systems that it connects to.
msg = 'No sosreports were collected, nothing to archive...'
self.exit(msg, 1)
- if self.opts.upload and self.policy.get_upload_url():
+ if self.opts.upload or self.opts.upload_url:
try:
self.policy.upload_archive(arc_name)
self.ui_log.info("Uploaded archive successfully")