Blob Blame History Raw
From f7277061859740712b67ef6b229c2fc07482ef16 Mon Sep 17 00:00:00 2001
From: Tony Asleson <tasleson@redhat.com>
Date: Wed, 25 May 2022 15:51:14 -0500
Subject: [PATCH 1/9] lvmdbusd: Correct conditional for lvm child process
 running

Poll returns None when process is running, else exit value.  If poll returns
0 we will fail to exit the select loop.

(cherry picked from commit 37733cd4eb5116db371ac1ae6e971e3c336c3ddb)
---
 daemons/lvmdbusd/lvm_shell_proxy.py.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/daemons/lvmdbusd/lvm_shell_proxy.py.in b/daemons/lvmdbusd/lvm_shell_proxy.py.in
index 7816daa8b..78fe1e422 100644
--- a/daemons/lvmdbusd/lvm_shell_proxy.py.in
+++ b/daemons/lvmdbusd/lvm_shell_proxy.py.in
@@ -75,7 +75,7 @@ class LVMShellProxy(object):
 						stderr += read_decoded(self.lvm_shell.stderr)
 
 				# Check to see if the lvm process died on us
-				if self.lvm_shell.poll():
+				if self.lvm_shell.poll() is not None:
 					raise Exception(self.lvm_shell.returncode, "%s" % stderr)
 
 				if stdout.endswith(SHELL_PROMPT):
-- 
2.37.1