mirror of
https://codeberg.org/polarisfm/youtube-dl.git
synced 2024-12-27 01:56:52 +00:00
[utils] Disallow non string types in parse_duration (Closes #4679)
This commit is contained in:
parent
5c4a81d934
commit
227d4822ff
1 changed files with 1 additions and 1 deletions
|
@ -1269,7 +1269,7 @@ def float_or_none(v, scale=1, invscale=1, default=None):
|
|||
|
||||
|
||||
def parse_duration(s):
|
||||
if s is None:
|
||||
if not isinstance(s, basestring if sys.version_info < (3, 0) else compat_str):
|
||||
return None
|
||||
|
||||
s = s.strip()
|
||||
|
|
Loading…
Reference in a new issue