summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin André <m.andre@redhat.com>2017-04-11 09:29:52 +0200
committerMartin André <m.andre@redhat.com>2017-04-11 09:29:52 +0200
commit2eddc12be70c98bc9d79afd6b8effef0e4ebfe15 (patch)
tree4cc57e69bfd4e45b58f06e1d79b7573b52389dc8
parent84690023cbae970d1fe753e781f0450b34614be5 (diff)
Do not log errors on non-existing container
This is cluttering up the logs with useless error messages, making it more difficult than necessary to debug the CI job. Change-Id: Icbdc4c74d99fea39b8722955dab56e5f538849aa
-rwxr-xr-xdocker/docker-puppet.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py
index c364d039..9a8e9211 100755
--- a/docker/docker-puppet.py
+++ b/docker/docker-puppet.py
@@ -61,7 +61,10 @@ def rm_container(name):
stderr=subprocess.PIPE)
cmd_stdout, cmd_stderr = subproc.communicate()
print(cmd_stdout)
- print(cmd_stderr)
+ if cmd_stderr and \
+ cmd_stderr != 'Error response from daemon: ' \
+ 'No such container: {}\n'.format(name):
+ print(cmd_stderr)
process_count = int(os.environ.get('PROCESS_COUNT',
multiprocessing.cpu_count()))