[utils] sanitize_path: Fix when path is empty string

This commit is contained in:
pukkandan 2022-04-09 10:11:25 +05:30
parent d46a3e7a12
commit 4abea8ca0a
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
2 changed files with 2 additions and 2 deletions

View file

@ -2237,7 +2237,7 @@ class YoutubeDL(object):
matches = LazyList(_check_formats(matches[::-1 if format_reverse else 1]))
try:
yield matches[format_idx - 1]
except IndexError:
except LazyList.IndexError:
return
filters = [self._build_format_filter(f) for f in selector.filters]