projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[utils] Add None check in str_to_int
[youtube-dl]
/
youtube_dl
/
utils.py
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index 64a9618ca62493f893af16b31b3fbd331bbdc1e7..919603c623ed8cd809745c1314442adabf4567c8 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-1194,6
+1194,8
@@
def format_bytes(bytes):
def str_to_int(int_str):
+ if int_str is None:
+ return None
int_str = re.sub(r'[,\.]', u'', int_str)
return int(int_str)