def arch(self):
"""Get the host system architecture"""
arch = ""
try:
machine = platform.machine()
bits = platform.architecture()[0]
if machine == "x86_64":
if bits == "32bit":
arch = "i386"
else:
arch = "amd64"
elif machine in ("i386", "i486", "i586", "i686"):
arch = "i386"
elif machine.startswith("arm"):
if bits == "32bit":
arch = "arm"
else:
arch = "arm64"
except (NameError, AttributeError):
pass
return arch
评论列表
文章目录