youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 831217291ac05ad75ef16fd6d9985e255489c1e5
parent db182c63fb4a58974e425a56d235131fd9efc531
Author: Sergey M․ <dstftw@gmail.com>
Date:   Sat, 25 Feb 2017 19:44:31 +0700

[compat] Use try except for compat_numeric_types

Diffstat:
Myoutube_dl/compat.py | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

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