diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2022-02-17 09:14:15 +0100 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2022-02-17 16:35:38 -0500 |
commit | 7069e99d1c5c443f96a98a7ed6db67fa14683e67 (patch) | |
tree | 04335863d778fcbc4c334d1033fa0167b4563c3b | |
parent | 751530acad7cb41a461b16bb7bbedf2753847ca4 (diff) | |
download | sos-7069e99d1c5c443f96a98a7ed6db67fa14683e67.tar.gz |
[report] Honor plugins' hardcoded plugin_timeout
Currently, plugin's plugin_timeout hardcoded default is superseded by
whatever --plugin-timeout value, even when this option is not used and
we eval it to TIMEOUT_DEFAULT.
In this case of not setting --plugin-timeout either -k plugin.timeout,
honour plugin's plugin_timeout instead.
Resolves: #2863
Closes: #2864
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r-- | sos/report/plugins/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sos/report/plugins/__init__.py b/sos/report/plugins/__init__.py index cc5cb65b..336b4d22 100644 --- a/sos/report/plugins/__init__.py +++ b/sos/report/plugins/__init__.py @@ -636,7 +636,10 @@ class Plugin(): if opt_timeout is None: _timeout = own_timeout elif opt_timeout is not None and own_timeout == -1: - _timeout = int(opt_timeout) + if opt_timeout == TIMEOUT_DEFAULT: + _timeout = default_timeout + else: + _timeout = int(opt_timeout) elif opt_timeout is not None and own_timeout > -1: _timeout = own_timeout else: |