From 233f64a4fd90a19c50d57b849ffaa6a25c835f34 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 2 Oct 2017 12:12:57 -0400 Subject: [PATCH] ceph-volume process allows to fully mute terminal output on commands Signed-off-by: Alfredo Deza --- src/ceph-volume/ceph_volume/process.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ceph-volume/ceph_volume/process.py b/src/ceph-volume/ceph_volume/process.py index bc5047a179c30..188e730c97bb4 100644 --- a/src/ceph-volume/ceph_volume/process.py +++ b/src/ceph-volume/ceph_volume/process.py @@ -115,10 +115,12 @@ def call(command, **kw): it is forcefully set to True if a return code is non-zero """ terminal_verbose = kw.pop('terminal_verbose', False) + show_command = kw.pop('show_command', False) command_msg = "Running command: %s" % ' '.join(command) stdin = kw.pop('stdin', None) logger.info(command_msg) - terminal.write(command_msg) + if show_command: + terminal.write(command_msg) process = subprocess.Popen( command, -- 2.39.5