From: Alfredo Deza Date: Mon, 2 Oct 2017 16:12:57 +0000 (-0400) Subject: ceph-volume process allows to fully mute terminal output on commands X-Git-Tag: v12.2.2~116^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1390fb76d76b76428e6a9210005dbf01fd3b3a1a;p=ceph.git ceph-volume process allows to fully mute terminal output on commands Signed-off-by: Alfredo Deza (cherry picked from commit 233f64a4fd90a19c50d57b849ffaa6a25c835f34) --- diff --git a/src/ceph-volume/ceph_volume/process.py b/src/ceph-volume/ceph_volume/process.py index bc5047a179c3..188e730c97bb 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,