This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
youtube-dl
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
1.1k
Wiki
Activity
Browse Source
[utils] Disallow non string types in parse_duration (
Closes
#4679
)
totalwebcasting
Sergey M․
10 years ago
parent
5c4a81d934
commit
227d4822ff
1 changed files
with
1 additions
and
1 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
youtube_dl/utils.py
+ 1
- 1
youtube_dl/utils.py
View File
@ -1269,7 +1269,7 @@ def float_or_none(v, scale=1, invscale=1, default=None):
def
parse_duration
(
s
)
:
def
parse_duration
(
s
)
:
if
s
is
None
:
if
not
isinstance
(
s
,
basestring
if
sys
.
version_info
<
(
3
,
0
)
else
compat_str
)
:
return
None
return
None
s
=
s
.
strip
(
)
s
=
s
.
strip
(
)
Write
Preview
Loading…
Cancel
Save