Switch some calls to to_stderr to report_error and report_warning
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 31 Jul 2013 19:20:46 +0000 (21:20 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 31 Jul 2013 19:20:46 +0000 (21:20 +0200)
youtube_dl/PostProcessor.py
youtube_dl/YoutubeDL.py

index 8c5e5399177458d9cb7e0fe8ffa5b3c873634729..4f0a165ba6384dee290077cc418791daabd9187b 100644 (file)
@@ -208,7 +208,7 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor):
             try:
                 os.utime(encodeFilename(new_path), (time.time(), information['filetime']))
             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
         return self._nopostoverwrites,information
index c76f1118ee54e66df89d52e09cc85c80914c5f75..4968669002a8edd0297a5cc3ba1ddddd3d59df49 100644 (file)
@@ -594,7 +594,7 @@ class YoutubeDL(object):
                         # No clear decision yet, let IE decide
                         keep_video = keep_video_wish
             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):
             try:
                 self.to_screen(u'Deleting original file %s (pass -k to keep)' % filename)