summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2008-08-15 15:44:50 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2008-08-15 15:44:50 -0300
commit608de9cd9a48792d428fe7d3d4483698a29e2b7a (patch)
tree41b5d90eb55057fd77dd21f0b9b9235d3a9128bd
parent26983462332661b3b44ad6b602eac504a2bf7b05 (diff)
downloadtuna-608de9cd9a48792d428fe7d3d4483698a29e2b7a.tar.gz
sysfs: cpu entries are the ones with a number in the 4th char
To weed off things like cpuidle: IOError: [Errno 2] No such file or directory: '/sys/devices/system/cpu/cpuidle/topology/physical_package_id' Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tuna/sysfs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tuna/sysfs.py b/tuna/sysfs.py
index 5763555..0738312 100644
--- a/tuna/sysfs.py
+++ b/tuna/sysfs.py
@@ -66,7 +66,7 @@ class cpus:
def reload(self):
for name in os.listdir(self.basedir):
- if name[:3] != "cpu":
+ if name[:3] != "cpu" or not name[3].isdigit():
continue
if name in self.cpus: