summaryrefslogtreecommitdiffstats
path: root/Lib/platform.py
diff options
context:
space:
mode:
authorKurochan <kuro@kurochan.org>2021-01-02 16:03:53 (GMT)
committerGitHub <noreply@github.com>2021-01-02 16:03:53 (GMT)
commitd9142831ba6780eef47bb68e878cf2f8910c4ab2 (patch)
tree1ba5c372cd6882c1630fc67a5c87ba8308d0f13c /Lib/platform.py
parent11276cd9c49faea66ce7760f26a238d1edbf6421 (diff)
downloadcpython-d9142831ba6780eef47bb68e878cf2f8910c4ab2.zip
cpython-d9142831ba6780eef47bb68e878cf2f8910c4ab2.tar.gz
cpython-d9142831ba6780eef47bb68e878cf2f8910c4ab2.tar.bz2
handle empty string in variable executable in platform.libc_ver() (#23140)
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-xLib/platform.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 985e12d..d567dd1 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -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')