diff options
author | Remita Amine <remitamine@gmail.com> | 2019-11-29 17:05:06 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2019-11-29 17:39:18 +0100 |
commit | 348c6bf1c1a00eec323d6e21ff7b9b12699afe04 (patch) | |
tree | 57082ca955ddaa2daab11f6a8a98dbcdb1c1fadc /youtube_dl/utils.py | |
parent | b568561eba6f4aceb87419e21aba11567c5de7da (diff) |
[utils] handle int values passed to str_to_int
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index b14603d8a..328f037a8 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -3519,8 +3519,8 @@ def str_or_none(v, default=None): def str_to_int(int_str): """ A more relaxed version of int_or_none """ - if int_str is None: - return None + if not isinstance(int_str, compat_str): + return int_str int_str = re.sub(r'[,\.\+]', '', int_str) return int(int_str) |