1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-22 18:22:21 +00:00

Message for delete video it's not an error.

When using youtube-dl from another python script with the quiet option
on, and a post procesor for extract the audio. The message of deleting
video shows in the first script logs (as it goes to stderr).

There is no way to keep this quiet as it's treated as an error, even if,
for me, it's not.
This commit is contained in:
Juan M 2013-02-23 22:52:52 +01:00
parent 4be0aa3539
commit 35d217133f

View file

@ -552,7 +552,7 @@ class FileDownloader(object):
self.to_stderr(u'ERROR: ' + e.msg) self.to_stderr(u'ERROR: ' + e.msg)
if keep_video is False and not self.params.get('keepvideo', False): if keep_video is False and not self.params.get('keepvideo', False):
try: try:
self.to_stderr(u'Deleting original file %s (pass -k to keep)' % filename) self.to_screen(u'Deleting original file %s (pass -k to keep)' % filename)
os.remove(encodeFilename(filename)) os.remove(encodeFilename(filename))
except (IOError, OSError): except (IOError, OSError):
self.to_stderr(u'WARNING: Unable to remove downloaded video file') self.to_stderr(u'WARNING: Unable to remove downloaded video file')