summaryrefslogtreecommitdiff
diff options
authorJeff Lane <jeffrey.lane@canonical.com>2015-07-17 14:10:07 -0400
committerJeff Lane <jeffrey.lane@canonical.com>2015-07-17 14:10:07 -0400
commit0766ce61fd700e3a8aa6f9b45cb63fe0884f9930 (patch)
treefa414da321d4785450a966f588ad23d72d44c3dd
parent752018a699f06357228966b4101f6b9d4ac222ce (diff)
changed try block in sysfs_cpu to catch OSError instead to support Python 3.2
-rwxr-xr-xbin/cpu_topology5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/cpu_topology b/bin/cpu_topology
index ba27b6a..7822f9e 100755
--- a/bin/cpu_topology
+++ b/bin/cpu_topology
@@ -46,9 +46,8 @@ class sysfs_cpu():
for i in items:
try:
syscpu_fh = open(os.path.join(self.path, i), 'r')
- except FileNotFoundError:
- print("ERROR: %s seems to be missing, unable to continue" %
- self.path)
+ except OSError as e:
+ print("ERROR: %s" % e)
sys.exit(1)
else:
self.syscpu[i] = syscpu_fh.readline().strip()