]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume process allows to fully mute terminal output on commands
authorAlfredo Deza <adeza@redhat.com>
Mon, 2 Oct 2017 16:12:57 +0000 (12:12 -0400)
committerAlfredo Deza <adeza@redhat.com>
Tue, 3 Oct 2017 13:00:13 +0000 (09:00 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/process.py

index bc5047a179c3033f2c06c5fa6edd0e1f9c4f7a9b..188e730c97bb455d704ec71a943f7d5ea8e8761c 100644 (file)
@@ -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,