diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-10 19:37:05 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-10 19:37:05 -0300 |
commit | ab0121106622a8975fe7b8b8dcb97ffa31ac6424 (patch) | |
tree | 1868b7da381a4c64769239a4b5b60a22b5349062 | |
parent | bbdaf5a2a0caa5423460bd5d8d76651a4090f96c (diff) | |
download | tuna-ab0121106622a8975fe7b8b8dcb97ffa31ac6424.tar.gz |
cmdline: Handle unknown schedulers in -p/--priority:
[root@mica ~]# tuna -t agetty -p OTHE:0
tuna: Unknown scheduler
Reported-by: Guy Streeter <streeter@redhat.com>
RHBZ-Reference: https://bugzilla.redhat.com/show_bug.cgi?id=563350
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-x | tuna-cmd.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tuna-cmd.py b/tuna-cmd.py index 7d6aefa..94349bf 100755 --- a/tuna-cmd.py +++ b/tuna-cmd.py @@ -474,7 +474,11 @@ def main(): if not thread_list: print ("tuna: %s " % o) + _("requires a thread list!") sys.exit(2) - tuna.threads_set_priority(thread_list, a, affect_children) + try: + tuna.threads_set_priority(thread_list, a, affect_children) + except SystemError, err: + print "tuna: %s" % err + sys.exit(2) elif o in ("-P", "--show_threads"): # If the user specified process names that weren't # resolved to pids, don't show all threads. |