2
0
Эх сурвалжийг харах

[utils] Add None check in str_to_int

Sergey M․ 11 жил өмнө
parent
commit
c45a6caa95
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      youtube_dl/utils.py

+ 2 - 0
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)