mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-10 00:58:17 +02:00
Workaround libc_ver
not be available on Windows Store version of Python
This commit is contained in:
parent
9665f15a96
commit
dab284f80f
@ -1966,13 +1966,16 @@ def system_identifier():
|
||||
python_implementation = platform.python_implementation()
|
||||
if python_implementation == 'PyPy' and hasattr(sys, 'pypy_version_info'):
|
||||
python_implementation += ' version %d.%d.%d' % sys.pypy_version_info[:3]
|
||||
libc_ver = []
|
||||
with contextlib.suppress(OSError): # We may not have access to the executable
|
||||
libc_ver = platform.libc_ver()
|
||||
|
||||
return 'Python %s (%s %s) - %s %s' % (
|
||||
platform.python_version(),
|
||||
python_implementation,
|
||||
platform.architecture()[0],
|
||||
platform.platform(),
|
||||
format_field(join_nonempty(*platform.libc_ver(), delim=' '), None, '(%s)'),
|
||||
format_field(join_nonempty(*libc_ver, delim=' '), None, '(%s)'),
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user