summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2021-11-29 16:26:19 +0100
committerGitHub <noreply@github.com>2021-11-29 16:26:19 +0100
commit037ece674b28569791b1d89da87b805b8f1a3810 (patch)
tree6785763aa5e7cdd9f322d9789080a275b2c70918 /lib
parent87cf38a4279d247b3e6b5380cc4222641a123343 (diff)
downloadspack-037ece674b28569791b1d89da87b805b8f1a3810.tar.gz
spack-037ece674b28569791b1d89da87b805b8f1a3810.tar.bz2
spack-037ece674b28569791b1d89da87b805b8f1a3810.tar.xz
spack-037ece674b28569791b1d89da87b805b8f1a3810.zip
distro: don't use deprecated linux_distribution (#27658)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/operating_systems/linux_distro.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/spack/spack/operating_systems/linux_distro.py b/lib/spack/spack/operating_systems/linux_distro.py
index 758e8bea47..8bb2aa7749 100644
--- a/lib/spack/spack/operating_systems/linux_distro.py
+++ b/lib/spack/spack/operating_systems/linux_distro.py
@@ -18,10 +18,8 @@ class LinuxDistro(OperatingSystem):
def __init__(self):
try:
# This will throw an error if imported on a non-Linux platform.
- from external.distro import linux_distribution
- distname, version, _ = linux_distribution(
- full_distribution_name=False)
- distname, version = str(distname), str(version)
+ import external.distro
+ distname, version = external.distro.id(), external.distro.version()
except ImportError:
distname, version = 'unknown', ''