|
@ -22,7 +22,8 @@ def getcpu(): |
|
|
cputype = subprocess.check_output(["sysctl", "-n", "machdep.cpu.brand_string"]).strip() |
|
|
cputype = subprocess.check_output(["sysctl", "-n", "machdep.cpu.brand_string"]).strip() |
|
|
|
|
|
|
|
|
elif platform.system() == "Linux": |
|
|
elif platform.system() == "Linux": |
|
|
for myline in open("/proc/cpuinfo"): |
|
|
with open("/proc/cpuinfo") as fp: |
|
|
|
|
|
for myline in fp.readlines(): |
|
|
if myline.startswith("model name"): |
|
|
if myline.startswith("model name"): |
|
|
# Typical line: |
|
|
# Typical line: |
|
|
# model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GHz |
|
|
# model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GHz |
|
|