35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
From adba6d6cad1a5c9f062dcf5ee4b4be40d4dc134f Mon Sep 17 00:00:00 2001
|
|
From: Leah Leshchinsky <lleshchi@redhat.com>
|
|
Date: Wed, 2 Feb 2022 15:18:29 -0500
|
|
Subject: [PATCH 3/5] tuna: Remove finally block in get_policy_and_rtprio
|
|
|
|
The implementation of the error handling block in
|
|
tuna.get_policy_and_rtprio() caused the exceptions raised by
|
|
tuna_sched.Policy to be consumed by the finally block.
|
|
When an invalid policy is passed via the '--priority' flag,
|
|
this consumption of the exception causes tuna to fail silently.
|
|
|
|
Remove the finally block in tuna.get_policy_and_rtprio().
|
|
|
|
Signed-off-by: Leah Leshchinsky <lleshchi@redhat.com>
|
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
|
|
diff --git a/tuna/tuna.py b/tuna/tuna.py
|
|
index 126990339985..31707c9cb69c 100755
|
|
--- a/tuna/tuna.py
|
|
+++ b/tuna/tuna.py
|
|
@@ -520,8 +520,8 @@ def get_policy_and_rtprio(parm):
|
|
rtprio = int(parms[1])
|
|
elif cp.is_rt():
|
|
rtprio = 1
|
|
- finally:
|
|
- return(policy, rtprio)
|
|
+
|
|
+ return (policy, rtprio)
|
|
|
|
def thread_filtered(tid, cpus_filtered, show_kthreads, show_uthreads):
|
|
if cpus_filtered:
|
|
--
|
|
2.27.0
|
|
|