From: Philipp Hagemeister Date: Fri, 12 Dec 2014 11:42:33 +0000 (+0100) Subject: [compat] Simplify kwarg detection code X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=c6973bd4124bb7e15b937f2d337bd7af20562ca6;p=youtube-dl [compat] Simplify kwarg detection code This enables nuitka to compile youtube-dl. --- diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py index f4a85443e..46d438846 100644 --- a/youtube_dl/compat.py +++ b/youtube_dl/compat.py @@ -297,7 +297,9 @@ else: # Old 2.6 and 2.7 releases require kwargs to be bytes try: - (lambda x: x)(**{'x': 0}) + def _testfunc(x): + pass + _testfunc(**{'x': 0}) except TypeError: def compat_kwargs(kwargs): return dict((bytes(k), v) for k, v in kwargs.items())