From 203e0e6db67b6c9af157d3b8e98e778a2e18120d Mon Sep 17 00:00:00 2001 From: Florian N Date: Wed, 12 Feb 2014 13:28:38 -0500 Subject: [PATCH] fix CPU type/make --- .gitignore | 1 + main/views.py | 4 ++-- pydash/settings.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 634e621..5d92862 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.pyc ._* *.sqlite3 +setting.py diff --git a/main/views.py b/main/views.py index afa70cf..31eb5f0 100755 --- a/main/views.py +++ b/main/views.py @@ -88,12 +88,12 @@ def get_cpus(): """ try: pipe = os.popen("cat /proc/cpuinfo |" + "grep 'model name'") - data = pipe.read().strip().split(':',2)[-1] + data = pipe.read().strip().split(':')[-1] pipe.close() if not data: pipe = os.popen("cat /proc/cpuinfo |" + "grep 'Processor'") - data = pipe.read().strip().split(':',2)[-1] + data = pipe.read().strip().split(':')[-1] pipe.close() cpus = multiprocessing.cpu_count() diff --git a/pydash/settings.py b/pydash/settings.py index 97afd3a..b1d66aa 100644 --- a/pydash/settings.py +++ b/pydash/settings.py @@ -135,4 +135,4 @@ LOGGING = { 'propagate': True, }, } -} \ No newline at end of file +}