use distro in place of deprecated dist() method
This commit is contained in:
parent
e91901911f
commit
ef23268573
@ -388,8 +388,9 @@ def platDesc():
|
|||||||
elif isWin:
|
elif isWin:
|
||||||
theos = "win:%s" % (platform.win32_ver()[0])
|
theos = "win:%s" % (platform.win32_ver()[0])
|
||||||
elif system == "Linux":
|
elif system == "Linux":
|
||||||
dist = platform.dist()
|
import distro
|
||||||
theos = "lin:%s:%s" % (dist[0], dist[1])
|
r = distro.linux_distribution(full_distribution_name=False)
|
||||||
|
theos = "lin:%s:%s" % (r[0], r[1])
|
||||||
else:
|
else:
|
||||||
theos = system
|
theos = system
|
||||||
break
|
break
|
||||||
|
@ -5,3 +5,4 @@ requests
|
|||||||
decorator
|
decorator
|
||||||
markdown
|
markdown
|
||||||
psutil; sys_platform == "win32"
|
psutil; sys_platform == "win32"
|
||||||
|
distro; sys_platform != "win32" and sys_platform != "darwin"
|
||||||
|
Loading…
Reference in New Issue
Block a user