1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-11-27 13:06:49 +01:00

[compat] Use try except for compat_numeric_types

This commit is contained in:
Sergey M․ 2017-02-25 19:44:31 +07:00
parent db182c63fb
commit 831217291a
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -2760,8 +2760,10 @@ else:
compat_kwargs = lambda kwargs: kwargs compat_kwargs = lambda kwargs: kwargs
compat_numeric_types = ((int, float, long, complex) if sys.version_info[0] < 3 try:
else (int, float, complex)) compat_numeric_types = (int, float, long, complex)
except NameError: # Python 3
compat_numeric_types = (int, float, complex)
if sys.version_info < (2, 7): if sys.version_info < (2, 7):