diff options
author | Sergey M․ <dstftw@gmail.com> | 2014-07-18 21:37:40 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2014-07-18 21:37:40 +0700 |
commit | c45a6caa95e9cea09b84417cfd13ff066986c695 (patch) | |
tree | 7952b599bdb14eaf39c8b710c93fd20054012fc0 /youtube_dl/utils.py | |
parent | 61bbddbaa6ac8e0e61a763d0b1500d952f3e027f (diff) |
[utils] Add None check in str_to_int
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
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) |