On Wed, 2 Feb 2022, Leah Leshchinsky wrote:
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(a)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:
--
Signed-off-by: John Kacur <jkacur(a)redhat.com>