|
|
003633 |
From 7069e99d1c5c443f96a98a7ed6db67fa14683e67 Mon Sep 17 00:00:00 2001
|
|
|
003633 |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
003633 |
Date: Thu, 17 Feb 2022 09:14:15 +0100
|
|
|
003633 |
Subject: [PATCH] [report] Honor plugins' hardcoded plugin_timeout
|
|
|
003633 |
|
|
|
003633 |
Currently, plugin's plugin_timeout hardcoded default is superseded by
|
|
|
003633 |
whatever --plugin-timeout value, even when this option is not used and
|
|
|
003633 |
we eval it to TIMEOUT_DEFAULT.
|
|
|
003633 |
|
|
|
003633 |
In this case of not setting --plugin-timeout either -k plugin.timeout,
|
|
|
003633 |
honour plugin's plugin_timeout instead.
|
|
|
003633 |
|
|
|
003633 |
Resolves: #2863
|
|
|
003633 |
Closes: #2864
|
|
|
003633 |
|
|
|
003633 |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
003633 |
---
|
|
|
003633 |
sos/report/plugins/__init__.py | 5 ++++-
|
|
|
003633 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
003633 |
|
|
|
003633 |
diff --git a/sos/report/plugins/__init__.py b/sos/report/plugins/__init__.py
|
|
|
003633 |
index cc5cb65b..336b4d22 100644
|
|
|
003633 |
--- a/sos/report/plugins/__init__.py
|
|
|
003633 |
+++ b/sos/report/plugins/__init__.py
|
|
|
003633 |
@@ -636,7 +636,10 @@ class Plugin():
|
|
|
003633 |
if opt_timeout is None:
|
|
|
003633 |
_timeout = own_timeout
|
|
|
003633 |
elif opt_timeout is not None and own_timeout == -1:
|
|
|
003633 |
- _timeout = int(opt_timeout)
|
|
|
003633 |
+ if opt_timeout == TIMEOUT_DEFAULT:
|
|
|
003633 |
+ _timeout = default_timeout
|
|
|
003633 |
+ else:
|
|
|
003633 |
+ _timeout = int(opt_timeout)
|
|
|
003633 |
elif opt_timeout is not None and own_timeout > -1:
|
|
|
003633 |
_timeout = own_timeout
|
|
|
003633 |
else:
|
|
|
003633 |
--
|
|
|
003633 |
2.34.1
|
|
|
003633 |
|