[Common] Replace distro.linux_distribution function

As of distro (1.6.0)[1], this function is marked as deprecated.
Instead, we will use the underlying functions directly, as explained in the (docs)[2].

[1] https://github.com/python-distro/distro/issues/263#issuecomment-927098357
[2] https://distro.readthedocs.io/en/latest/#distro.linux_distribution

Closes: https://github.com/deluge-torrent/deluge/pull/345
This commit is contained in:
DjLegolas 2022-01-22 12:53:50 +02:00 committed by Calum Lind
parent 2cad0f46f2
commit 4f87612a0f
No known key found for this signature in database
GPG Key ID: 90597A687B836BA3

View File

@ -265,7 +265,7 @@ def get_os_version():
os_version = list(platform.mac_ver())
os_version[1] = '' # versioninfo always empty.
elif distro:
os_version = distro.linux_distribution()
os_version = (distro.name(), distro.version(), distro.codename())
else:
os_version = (platform.release(),)