Skip to content

Commit

Permalink
better format wget output
Browse files Browse the repository at this point in the history
  • Loading branch information
pirate committed Jul 5, 2017
1 parent 02f711b commit 5122fa0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5122fa0

Please sign in to comment.