From 49111c3922ddd47b4450f87667b3e55ae484eb3f Mon Sep 17 00:00:00 2001 From: root Date: Thu, 2 Nov 2017 18:39:05 +0100 Subject: [PATCH] publish.py: silence sphinx generation output --- publish.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/publish.py b/publish.py index a313221..d07be6d 100755 --- a/publish.py +++ b/publish.py @@ -167,8 +167,9 @@ def publish_sphinx(module): output_dir = os.path.join(web_directory, module.get('name')) build_dir = os.path.join(checkout_dir, '_build/html') cmd = '%s/venv/bin/sphinx-build -b html -d _build/doctrees . _build/html' % os.getcwd() - os.system('cd %s && %s' % (checkout_dir, cmd)) - shutil.rmtree(output_dir) + os.system('cd %s && %s >/dev/null 2>&1' % (checkout_dir, cmd)) + if os.path.isdir(output_dir): + shutil.rmtree(output_dir) shutil.copytree(build_dir, output_dir)