From 3fc77d46f00b5ff200afa48f69f454f361189e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E7=82=B9?= <67537842+alittlesir@users.noreply.github.com> Date: Tue, 2 Aug 2022 18:27:35 +0800 Subject: [PATCH] add support for euleros EulerOS is a commercial Linux distribution developed for enterprise application environments, So it is recommended to add support for euleros --- Lib/platform.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/platform.py b/Lib/platform.py index 7af46ffd17728a..7fc951d9b15e09 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -297,7 +297,7 @@ def _dist_try_harder(distname, version, id): # and http://www.die.net/doc/linux/man/man1/lsb_release.1.html _supported_dists = ( - 'SuSE', 'debian', 'fedora', 'redhat', 'centos', + 'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'euleros', 'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo', 'UnitedLinux', 'turbolinux', 'arch', 'mageia') @@ -367,6 +367,8 @@ def _linux_distribution(distname, version, id, supported_dists, return distname, version, id etc.sort() for file in etc: + if os.path.islink(os.path.join(_UNIXCONFDIR, file)): + continue m = _release_filename.match(file) if m is not None: _distname, dummy = m.groups()