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: v13.0.1~689^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=233f64a4fd90a19c50d57b849ffaa6a25c835f34;p=ceph.git ceph-volume process allows to fully mute terminal output on commands Signed-off-by: Alfredo Deza --- diff --git a/src/ceph-volume/ceph_volume/process.py b/src/ceph-volume/ceph_volume/process.py index bc5047a179c..188e730c97b 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,