summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDjLegolas <djlegolas@protonmail.com>2022-01-22 12:53:50 +0200
committerCalum Lind <calumlind+deluge@gmail.com>2022-01-22 12:06:38 +0000
commit4f87612a0f5503a9b824c37c59a75416aefc601d (patch)
tree6272950db13c43539f776dc66493791a955bde3a
parent2cad0f46f2fd7d9f9cc6f6f0998a982254ccd378 (diff)
downloaddeluge-4f87612a0f5503a9b824c37c59a75416aefc601d.tar.gz
deluge-4f87612a0f5503a9b824c37c59a75416aefc601d.tar.bz2
deluge-4f87612a0f5503a9b824c37c59a75416aefc601d.zip
[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
-rw-r--r--deluge/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/deluge/common.py b/deluge/common.py
index d6d5312ca..da056d484 100644
--- a/deluge/common.py
+++ b/deluge/common.py
@@ -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(),)