distro: don't use deprecated linux_distribution (#27658)
This commit is contained in:
parent
87cf38a427
commit
037ece674b
@ -18,10 +18,8 @@ class LinuxDistro(OperatingSystem):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
try:
|
try:
|
||||||
# This will throw an error if imported on a non-Linux platform.
|
# This will throw an error if imported on a non-Linux platform.
|
||||||
from external.distro import linux_distribution
|
import external.distro
|
||||||
distname, version, _ = linux_distribution(
|
distname, version = external.distro.id(), external.distro.version()
|
||||||
full_distribution_name=False)
|
|
||||||
distname, version = str(distname), str(version)
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
distname, version = 'unknown', ''
|
distname, version = 'unknown', ''
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user