diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-10-14 22:37:03 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-10-14 22:37:03 +0600 |
commit | af98f8ff37b3a0d9d1f743f4fc6c646333501eb6 (patch) | |
tree | 8281a34861066ba52c72368b100b997b4c0f6d60 | |
parent | caf80631f0c57b29187e2aa909fa1a3a6325d6e6 (diff) | |
download | youtube-dl-af98f8ff37b3a0d9d1f743f4fc6c646333501eb6.tar.xz |
[utils] Return default on fail in int_or_none
-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 83b44caaa..7dbe25661 100644 --- 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): |