Browse Source

fix CPU type/make

windows
Florian N 12 years ago
parent
commit
203e0e6db6
  1. 1
      .gitignore
  2. 4
      main/views.py

1
.gitignore

@ -1,3 +1,4 @@
*.pyc *.pyc
._* ._*
*.sqlite3 *.sqlite3
setting.py

4
main/views.py

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

Loading…
Cancel
Save