mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-15 06:48:00 +09:00
[compat] Simplify kwarg detection code
This enables nuitka to compile youtube-dl.
This commit is contained in:
parent
f8780e6d11
commit
c6973bd412
@ -297,7 +297,9 @@ else:
|
|||||||
|
|
||||||
# Old 2.6 and 2.7 releases require kwargs to be bytes
|
# Old 2.6 and 2.7 releases require kwargs to be bytes
|
||||||
try:
|
try:
|
||||||
(lambda x: x)(**{'x': 0})
|
def _testfunc(x):
|
||||||
|
pass
|
||||||
|
_testfunc(**{'x': 0})
|
||||||
except TypeError:
|
except TypeError:
|
||||||
def compat_kwargs(kwargs):
|
def compat_kwargs(kwargs):
|
||||||
return dict((bytes(k), v) for k, v in kwargs.items())
|
return dict((bytes(k), v) for k, v in kwargs.items())
|
||||||
|
Loading…
Reference in New Issue
Block a user