From 1064d1e13fdd295a275779845c5c035cab138b03 Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Wed, 19 Jan 2022 19:12:29 +0100 Subject: [PATCH] silence stdout on prune --- setup.py | 2 +- trueupdate/__init__.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index b5fadf4d..feb669f4 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ README_MD = open(join(dirname(abspath(__file__)), "README.md")).read() setup( name="trueupdate", - version="2.1.5", + version="2.1.6", # The packages that constitute your project. # For my project, I have only one - "pydash". diff --git a/trueupdate/__init__.py b/trueupdate/__init__.py index 5dfe766c..f277de79 100644 --- a/trueupdate/__init__.py +++ b/trueupdate/__init__.py @@ -112,10 +112,7 @@ def docker_prune(): if PRUNE: print("Pruning old docker images...\n") process = subprocess.Popen(["docker", "image", "prune", "-af"], stdout=subprocess.PIPE) - while process.poll() is None: - lines = process.stdout.readline() - print (lines) - print (process.stdout.read()) + print("Images pruned.\n") def run(): process_args()