mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
handle empty string in variable executable in platform.libc_ver() (#23140)
This commit is contained in:
parent
11276cd9c4
commit
d9142831ba
2 changed files with 2 additions and 1 deletions
|
@ -174,7 +174,7 @@ def libc_ver(executable=None, lib='', version='', chunksize=16384):
|
|||
The file is read and scanned in chunks of chunksize bytes.
|
||||
|
||||
"""
|
||||
if executable is None:
|
||||
if not executable:
|
||||
try:
|
||||
ver = os.confstr('CS_GNU_LIBC_VERSION')
|
||||
# parse 'glibc 2.28' as ('glibc', '2.28')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue