use distro in place of deprecated dist() method

This commit is contained in:
Damien Elmes 2019-03-04 15:39:10 +10:00
parent e91901911f
commit ef23268573
2 changed files with 4 additions and 2 deletions

View File

@ -388,8 +388,9 @@ def platDesc():
elif isWin:
theos = "win:%s" % (platform.win32_ver()[0])
elif system == "Linux":
dist = platform.dist()
theos = "lin:%s:%s" % (dist[0], dist[1])
import distro
r = distro.linux_distribution(full_distribution_name=False)
theos = "lin:%s:%s" % (r[0], r[1])
else:
theos = system
break

View File

@ -5,3 +5,4 @@ requests
decorator
markdown
psutil; sys_platform == "win32"
distro; sys_platform != "win32" and sys_platform != "darwin"