mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 07:04:27 -04:00
better format wget output
This commit is contained in:
parent
02f711b8cb
commit
5122fa0738
1 changed files with 2 additions and 1 deletions
1
fetch.py
1
fetch.py
|
@ -39,6 +39,7 @@ 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(' 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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue