aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Silbe <silbe@linux.vnet.ibm.com>2016-09-06 22:05:51 +0200
committerFam Zheng <famz@redhat.com>2016-09-08 19:56:34 +0800
commitf8042deafa724924d03c44c7bd21e269ccb5190b (patch)
tree5d11c713b5b5d558184908e1220d5eb54659f76c
parentae2f659ca5eb8e39a83b11dc55e7e474b536e4e6 (diff)
docker: silence debootstrap when --quiet is given
If we silence docker when --quiet is given, we should also silence the .pre script (i.e. debootstrap). Only discards stdout, so some diagnostics (e.g. from git clone) are still printed. Most of the verbose output is gone however and this way we still have a chance to see error messages. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-9-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: Fam Zheng <famz@redhat.com>
-rwxr-xr-xtests/docker/docker.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index efb2bf4ac2..b85c165130 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -239,8 +239,9 @@ class BuildCommand(SubCommand):
# Is there a .pre file to run in the build context?
docker_pre = os.path.splitext(args.dockerfile)[0]+".pre"
if os.path.exists(docker_pre):
+ stdout = DEVNULL if args.quiet else None
rc = subprocess.call(os.path.realpath(docker_pre),
- cwd=docker_dir)
+ cwd=docker_dir, stdout=stdout)
if rc == 3:
print "Skip"
return 0