Fixed AttributeError in the packaging script when using python>=3.8.

platform.dist() is deprecated since python version 3.5 and was removed in version 3.8.
Added exception to use the distro package in that case, as suggested by the python documentation:
https://docs.python.org/3.7/library/platform.html?highlight=platform#module-platform
This commit is contained in:
KIAaze 2020-05-20 23:13:11 +01:00
parent 6abcedddda
commit ea191a8924
1 changed files with 5 additions and 1 deletions

View File

@ -212,7 +212,11 @@ def main():
package_windows()
else:
if not args.arch_pkg:
distname, _, _ = platform.dist()
try:
distname, _, _ = platform.dist()
except AttributeError:
import distro
distname, _, _ = distro.linux_distribution(full_distribution_name=False)
else:
distname = "arch"
if distname == "arch":