0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-04 23:35:04 +00:00

[utils] Add None check in str_to_int

This commit is contained in:
Sergey M․ 2014-07-18 21:37:40 +07:00
parent 61bbddbaa6
commit c45a6caa95

View file

@ -1194,6 +1194,8 @@ def format_bytes(bytes):
def str_to_int(int_str): def str_to_int(int_str):
if int_str is None:
return None
int_str = re.sub(r'[,\.]', u'', int_str) int_str = re.sub(r'[,\.]', u'', int_str)
return int(int_str) return int(int_str)