summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2014-12-12 12:42:33 +0100
committerPhilipp Hagemeister <[email protected]>2014-12-12 12:42:35 +0100
commitc6973bd4124bb7e15b937f2d337bd7af20562ca6 (patch)
tree81502ca3034aaefeadafcf937634810114292137
parentf8780e6d11489a3ddff5019ad06fca1b0bed6e9a (diff)
downloadyoutube-dl-c6973bd4124bb7e15b937f2d337bd7af20562ca6.tar.gz
youtube-dl-c6973bd4124bb7e15b937f2d337bd7af20562ca6.zip
[compat] Simplify kwarg detection code
This enables nuitka to compile youtube-dl.
-rw-r--r--youtube_dl/compat.py4
1 files changed, 3 insertions, 1 deletions
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())