diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-08-15 15:44:50 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-08-15 15:44:50 -0300 |
commit | 608de9cd9a48792d428fe7d3d4483698a29e2b7a (patch) | |
tree | 41b5d90eb55057fd77dd21f0b9b9235d3a9128bd | |
parent | 26983462332661b3b44ad6b602eac504a2bf7b05 (diff) | |
download | tuna-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.py | 2 |
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: |