Browse Source

add pi cpu identification

windows
Florian N 12 years ago
parent
commit
e0af48bd8f
  1. 7
      main/views.py

7
main/views.py

@ -90,7 +90,12 @@ def get_cpus():
pipe = os.popen("cat /proc/cpuinfo |" + "grep 'model name'")
data = pipe.read().strip().split(':',2)[-1]
pipe.close()
if not data:
pipe = os.popen("cat /proc/cpuinfo |" + "grep 'Processor'")
data = pipe.read().strip().split(':',2)[-1]
pipe.close()
cpus = multiprocessing.cpu_count()
data = {'cpus': cpus, 'type': data}

Loading…
Cancel
Save