projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
caf8063
)
[utils] Return default on fail in int_or_none
author
Sergey M․
<dstftw@gmail.com>
Wed, 14 Oct 2015 16:37:03 +0000
(22:37 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 14 Oct 2015 16:37:03 +0000
(22:37 +0600)
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index 83b44caaa9a82c0df00eeec5a6cc643a8ad90363..7dbe2566168defa7a24a189042ef168b0794ec68 100644
(file)
--- 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):