Explorar o código

Make "requested format not available" expected (#1655)

Philipp Hagemeister %!s(int64=12) %!d(string=hai) anos
pai
achega
78a3a9f89e
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      youtube_dl/YoutubeDL.py

+ 2 - 1
youtube_dl/YoutubeDL.py

@@ -524,7 +524,8 @@ class YoutubeDL(object):
                     formats_to_download = [selected_format]
                     formats_to_download = [selected_format]
                     break
                     break
         if not formats_to_download:
         if not formats_to_download:
-            raise ExtractorError(u'requested format not available')
+            raise ExtractorError(u'requested format not available',
+                                 expected=True)
 
 
         if download:
         if download:
             if len(formats_to_download) > 1:
             if len(formats_to_download) > 1: