X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Fcompat.py;h=46d438846787e9a95ea8631c869f96341d4ccb9c;hb=d6a8160902c2f316b3772648d6eec6bfcb095471;hp=27596687d0d2c354990e6112027e054865c1c79c;hpb=b061ea6e9f49ef2f80e8dac6413088b1b83cc92d;p=youtube-dl.git diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py index 27596687d..46d438846 100644 --- a/youtube_dl/compat.py +++ b/youtube_dl/compat.py @@ -247,7 +247,7 @@ else: userhome = compat_getenv('HOME') elif 'USERPROFILE' in os.environ: userhome = compat_getenv('USERPROFILE') - elif not 'HOMEPATH' in os.environ: + elif 'HOMEPATH' not in os.environ: return path else: try: @@ -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())