From 231553b98687bc00c90acec3606f0ad4188d7d07 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Tue, 12 Nov 2024 09:52:48 -0800 Subject: [PATCH] Fix python2 exception handling in ocperf --- ocperf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocperf.py b/ocperf.py index 018587d1..9aab8e14 100755 --- a/ocperf.py +++ b/ocperf.py @@ -116,7 +116,7 @@ def cached_read(fn): try: with open(fn) as f: cached_vals[fn] = f.read() - except OSError: + except (OSError, IOError): cached_vals[fn] = "?" return cached_vals[fn]