mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-26 02:37:41 +00:00
[utils] Return default on fail in int_or_none
This commit is contained in:
parent
caf80631f0
commit
af98f8ff37
1 changed files with 1 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue