projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c4a81d
)
[utils] Disallow non string types in parse_duration (Closes #4679)
author
Sergey M․
<dstftw@gmail.com>
Mon, 12 Jan 2015 15:06:26 +0000
(21:06 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Mon, 12 Jan 2015 15:06:26 +0000
(21:06 +0600)
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index deaf718030f0f7f16e923dfe92d42a8d6ec1f53a..98732e8e99036b32eaa7b802a1ed028e85e0f7ae 100644
(file)
--- 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()