logo

youtube-dl

[mirror] Download/Watch videos from video hosters
commit: af98f8ff37b3a0d9d1f743f4fc6c646333501eb6
parent caf80631f0c57b29187e2aa909fa1a3a6325d6e6
Author: Sergey M․ <dstftw@gmail.com>
Date:   Wed, 14 Oct 2015 22:37:03 +0600

[utils] Return default on fail in int_or_none

Diffstat:

Myoutube_dl/utils.py2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py @@ -1376,7 +1376,7 @@ def int_or_none(v, scale=1, default=None, get_attr=None, invscale=1): try: return int(v) * invscale // scale except ValueError: - pass + return default def str_or_none(v, default=None):