aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py2
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()