Skip to contentSkip to conversation

master - lvmdbusd: Remove WARNING for 'lvm help'

PATCH tasleson 1 participant 1 message Jun 28, 2016

lore
Share & tools
lore

tasleson

author
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e6e5c3d3ecb7de18ec2d103df8e5b0229df9ce1c
Commit:        e6e5c3d3ecb7de18ec2d103df8e5b0229df9ce1c
Parent:        7c5a08521b687c7c7074b41d880e1e559d4ea6b8
Author:        Tony Asleson <[email protected]>
AuthorDate:    Tue Jun 28 12:52:31 2016 -0500
Committer:     Tony Asleson <[email protected]>
CommitterDate: Tue Jun 28 12:54:48 2016 -0500

lvmdbusd: Remove WARNING for 'lvm help'

We call 'lvm help' to find out if fullreport is supported. Lvm dumps help to stderr. Common code prints a warning if we exit with 0, but have something in stderr so we are skipping the warning message.

---
 daemons/lvmdbusd/cmdhandler.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
daemons/lvmdbusd/cmdhandler.py +1 -1
index 560b389..391757d 100644
@@ -110,7 +110,7 @@ def call_lvm(command, debug=False):
 		_debug_c(command, process.returncode, (stdout_text, stderr_text))
 
 	if process.returncode == 0:
-		if cfg.DEBUG and out[1] and len(out[1]):
+		if cfg.DEBUG and out[1] and len(out[1]) and 'help' not in command:
 			log_error('WARNING: lvm is out-putting text to STDERR on success!')
 			_debug_c(command, process.returncode, (stdout_text, stderr_text))