mirror of
https://github.com/Pecusx/piradio-mini.git
synced 2026-05-20 22:33:44 +02:00
Better processor cores counting.
This commit is contained in:
+1
-1
@@ -855,7 +855,7 @@ class Radio:
|
|||||||
|
|
||||||
# Get number of processor cores from /proc/cpuinfo
|
# Get number of processor cores from /proc/cpuinfo
|
||||||
def getCores(self):
|
def getCores(self):
|
||||||
cores_text = self.execCommand("cat /proc/cpuinfo | grep -c processor")
|
cores_text = self.execCommand("cat /proc/cpuinfo | grep -c 'processor[[:blank:]]:'")
|
||||||
self.cores = int(cores_text)
|
self.cores = int(cores_text)
|
||||||
return self.cores
|
return self.cores
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user