This commit is contained in:
parent
43d71db74f
commit
2b5f9fc990
@ -15,7 +15,7 @@ def get_system_info() -> str:
|
||||
version = platform.version()
|
||||
machine = platform.machine() or "unknown"
|
||||
processor = platform.processor() or "unknown"
|
||||
architecture = platform.architecture()[0]
|
||||
architecture = platform.architecture()[0] # '64bit' or '32bit'
|
||||
|
||||
if system == "Windows":
|
||||
try:
|
||||
@ -28,6 +28,11 @@ def get_system_info() -> str:
|
||||
system_str = f"Windows {release}"
|
||||
elif system == "Linux":
|
||||
try:
|
||||
# Trying to get CPU info from /proc/cpuinfo
|
||||
with open("/proc/cpuinfo") as f:
|
||||
cpu_info = f.read()
|
||||
# Get the processor information
|
||||
processor = " ".join([line.split(":")[1].strip() for line in cpu_info.splitlines() if "model name" in line]) or processor
|
||||
os_info = {}
|
||||
with open("/etc/os-release") as f:
|
||||
for line in f:
|
||||
|
Loading…
x
Reference in New Issue
Block a user