mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-17 17:56:44 +00:00
Print progress messages to stderr when printing JSON
This avoids the messages breaking JSON parsing when the output is being redirected to a file and parsed.
This commit is contained in:
parent
ea15965d6d
commit
06e25957b6
@ -172,7 +172,10 @@ class WaybackMachineDownloader
|
||||
|
||||
def list_files
|
||||
# retrieval produces its own output
|
||||
@orig_stdout = $stdout
|
||||
$stdout = $stderr
|
||||
files = get_file_list_by_timestamp
|
||||
$stdout = @orig_stdout
|
||||
puts "["
|
||||
files.each do |file|
|
||||
puts file.to_json + ","
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user