diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-01-12 21:06:26 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-01-12 21:06:26 +0600 |
commit | 227d4822fff13ea449f11531ce54c56b2b01432b (patch) | |
tree | dbf9894f7db4687c4cf3595ef9bc21e1a215b2bd /youtube_dl/utils.py | |
parent | 5c4a81d9345f0520a9d40acbb8212fb94bcc9e24 (diff) |
[utils] Disallow non string types in parse_duration (Closes #4679)
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index deaf71803..98732e8e9 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -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() |