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:
parent
6abcedddda
commit
ea191a8924
|
@ -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":
|
||||
|
|
Loading…
Reference in New Issue