From: Sergey M․ Date: Fri, 18 Jul 2014 14:37:40 +0000 (+0700) Subject: [utils] Add None check in str_to_int X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=c45a6caa95e9cea09b84417cfd13ff066986c695;p=youtube-dl [utils] Add None check in str_to_int --- diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 64a9618ca..919603c62 100644 --- 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)