From 5122fa07384e72ac357b95f3693b4a3d5e2ee56d Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Wed, 5 Jul 2017 17:28:09 -0500 Subject: [PATCH] better format wget output --- fetch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch.py b/fetch.py index ea850a55..070ce7c4 100644 --- a/fetch.py +++ b/fetch.py @@ -39,7 +39,8 @@ def fetch_wget(out_dir, link, overwrite=False, requisites=True, timeout=TIMEOUT) result = run(CMD, stdout=PIPE, stderr=PIPE, cwd=out_dir, timeout=timeout + 1) # index.html end() if result.returncode > 0: - print('\n'.join(' ' + line for line in result.stderr.decode().rsplit('\n', 10)[-10:] if line.strip())) + print(' wget output:') + print('\n'.join(' ' + line for line in result.stderr.decode().rsplit('\n', 10)[-10:] if line.strip())) raise Exception('Failed to wget download') chmod_file(link['domain'], cwd=out_dir) except Exception as e: