Skip to content

Commit b1a5082

Browse files
committed
only catch the RuntimeError, leave the PermissionError for downstream
Signed-off-by: Keming <kemingy94@gmail.com>
1 parent 7024bd1 commit b1a5082

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/profiling/sampling/sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(self, pid, sample_interval_usec, all_threads, *, mode=PROFILING_MOD
4848
opcodes=opcodes, skip_non_matching_threads=skip_non_matching_threads,
4949
cache_frames=True, stats=collect_stats
5050
)
51-
except Exception as err:
51+
except RuntimeError as err:
5252
raise SystemExit(err)
5353
# Track sample intervals and total sample count
5454
self.sample_intervals = deque(maxlen=100)

0 commit comments

Comments
 (0)