[utils] Add None check in str_to_int

pull/2/head
Sergey M․ 11 years ago
parent 61bbddbaa6
commit c45a6caa95

@ -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)

Loading…
Cancel
Save