1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-30 04:08:01 +01:00

Switch some calls to to_stderr to report_error and report_warning

This commit is contained in:
Jaime Marquínez Ferrándiz 2013-07-31 21:20:46 +02:00
parent 930ad9eecc
commit bbcbf4d459
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor):
try: try:
os.utime(encodeFilename(new_path), (time.time(), information['filetime'])) os.utime(encodeFilename(new_path), (time.time(), information['filetime']))
except: except:
self._downloader.to_stderr(u'WARNING: Cannot update utime of audio file') self._downloader.report_warning(u'Cannot update utime of audio file')
information['filepath'] = new_path information['filepath'] = new_path
return self._nopostoverwrites,information return self._nopostoverwrites,information

View File

@ -594,7 +594,7 @@ class YoutubeDL(object):
# No clear decision yet, let IE decide # No clear decision yet, let IE decide
keep_video = keep_video_wish keep_video = keep_video_wish
except PostProcessingError as e: except PostProcessingError as e:
self.to_stderr(u'ERROR: ' + e.msg) self.report_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_screen(u'Deleting original file %s (pass -k to keep)' % filename) self.to_screen(u'Deleting original file %s (pass -k to keep)' % filename)