aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-01-01 21:52:24 +0700
committerSergey M․ <dstftw@gmail.com>2018-01-01 21:52:24 +0700
commitb300cda4769a987c501db298f3f107326521d45c (patch)
tree0c366ffa8752a07d932497b97fd247cf00c06136
parent04cf1a191a6b47bac93364ed8eb237a25058ee5e (diff)
downloadyoutube-dl-b300cda4769a987c501db298f3f107326521d45c.zip
youtube-dl-b300cda4769a987c501db298f3f107326521d45c.tar.gz
youtube-dl-b300cda4769a987c501db298f3f107326521d45c.tar.bz2
[YoutubeDL] Output python implementation in debug header
-rwxr-xr-xyoutube_dl/YoutubeDL.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index ace80f1..97bd9c5 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -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()