From d9142831ba6780eef47bb68e878cf2f8910c4ab2 Mon Sep 17 00:00:00 2001 From: Kurochan Date: Sun, 3 Jan 2021 01:03:53 +0900 Subject: handle empty string in variable executable in platform.libc_ver() (#23140) --- Lib/platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/platform.py') diff --git a/Lib/platform.py b/Lib/platform.py index 985e12d968..d567dd1a6e 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') -- cgit v1.2.1