Skip to contentSkip to conversation

main - lvmdbusd: Correct conditional for lvm child process running

PATCH Tony Asleson 1 participant 1 message Jun 30, 2022

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=37733cd4eb5116db371ac1ae6e971e3c336c3ddb
Commit:        37733cd4eb5116db371ac1ae6e971e3c336c3ddb
Parent:        db5277c97155632ce83e1125e348eda97c871968
Author:        Tony Asleson <[email protected]>
AuthorDate:    Wed May 25 15:51:14 2022 -0500
Committer:     Tony Asleson <[email protected]>
CommitterDate: Thu Jun 30 10:55:16 2022 -0500

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.

---
 daemons/lvmdbusd/lvm_shell_proxy.py.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
daemons/lvmdbusd/lvm_shell_proxy.py.in +1 -1
index 7816daa8b..78fe1e422 100644
@@ -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):