1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-05 17:12:36 +00:00

[YoutubeDL] Output python implementation in debug header

This commit is contained in:
Sergey M․ 2018-01-01 21:52:24 +07:00
parent 04cf1a191a
commit b300cda476
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -2233,8 +2233,16 @@ class YoutubeDL(object):
sys.exc_clear()
except Exception:
pass
self._write_string('[debug] Python version %s - %s\n' % (
platform.python_version(), platform_name()))
def python_implementation():
impl_name = platform.python_implementation()
if impl_name == 'PyPy' and hasattr(sys, 'pypy_version_info'):
return impl_name + ' version %d.%d.%d' % sys.pypy_version_info[:3]
return impl_name
self._write_string('[debug] Python version %s (%s) - %s\n' % (
platform.python_version(), python_implementation(),
platform_name()))
exe_versions = FFmpegPostProcessor.get_versions(self)
exe_versions['rtmpdump'] = rtmpdump_version()