Blame SOURCES/bz1470813-fencing-4-make-timeout-0-mean-forever.patch

92e554
From 083ecce0e7b6cd41eef026c8a1ba986f8814a7d9 Mon Sep 17 00:00:00 2001
92e554
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
92e554
Date: Thu, 5 Nov 2020 11:53:55 +0100
92e554
Subject: [PATCH] fencing: fix run_command() to allow timeout=0 to mean forever
92e554
92e554
---
92e554
 lib/fencing.py.py | 2 +-
92e554
 1 file changed, 1 insertion(+), 1 deletion(-)
92e554
92e554
diff --git a/lib/fencing.py.py b/lib/fencing.py.py
92e554
index fa34f13a..9654f57b 100644
92e554
--- a/lib/fencing.py.py
92e554
+++ b/lib/fencing.py.py
92e554
@@ -1062,7 +1062,7 @@ def run_command(options, command, timeout=None, env=None, log_command=None):
92e554
 
92e554
 	thread = threading.Thread(target=process.wait)
92e554
 	thread.start()
92e554
-	thread.join(timeout)
92e554
+	thread.join(timeout if timeout else None)
92e554
 	if thread.is_alive():
92e554
 		process.kill()
92e554
 		fail(EC_TIMED_OUT, stop=(int(options.get("retry", 0)) < 1))