mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-10 11:36:01 +00:00
[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:
parent
2cad0f46f2
commit
4f87612a0f
@ -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(),)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user