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

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