1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-12-25 07:47:55 +01:00

Throw an error if no video formats are found

This commit is contained in:
Philipp Hagemeister 2014-01-27 07:31:54 +01:00
parent ca3e054750
commit 7e8caf30c0

View File

@ -466,6 +466,9 @@ class InfoExtractor(object):
return RATING_TABLE.get(rating.lower(), None) return RATING_TABLE.get(rating.lower(), None)
def _sort_formats(self, formats): def _sort_formats(self, formats):
if not formats:
raise ExtractorError(u'No video formats found')
def _formats_key(f): def _formats_key(f):
# TODO remove the following workaround # TODO remove the following workaround
from ..utils import determine_ext from ..utils import determine_ext