diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-01-08 16:37:05 -0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-01-08 16:37:05 -0200 |
commit | d050b0d5d43f60c648004442f390c759f3fcba1e (patch) | |
tree | aa5a4ab8c8007727d51e0f98f0fd7ebc707be30f | |
parent | 9fae21ee420eb4c932e3320002a90de09bed6932 (diff) | |
download | tuna-d050b0d5d43f60c648004442f390c759f3fcba1e.tar.gz |
gui: Use schedutils.SCHED_{OTHER,FIFO,RR}
Its available since python-schedutils 0.2.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | rpm/SPECS/tuna.spec | 2 | ||||
-rw-r--r-- | tuna/tuna_gui.py | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/rpm/SPECS/tuna.spec b/rpm/SPECS/tuna.spec index baf8468..8313642 100644 --- a/rpm/SPECS/tuna.spec +++ b/rpm/SPECS/tuna.spec @@ -12,7 +12,7 @@ BuildArch: noarch BuildRequires: python-devel Requires: python-ethtool Requires: python-linux-procfs >= 0.4.1 -Requires: python-schedutils +Requires: python-schedutils >= 0.2 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %description diff --git a/tuna/tuna_gui.py b/tuna/tuna_gui.py index cce622c..1467424 100644 --- a/tuna/tuna_gui.py +++ b/tuna/tuna_gui.py @@ -17,9 +17,6 @@ except: # OK, we're modern, having sets as first class citizens pass -# FIXME: should go to python-schedutils -( SCHED_OTHER, SCHED_FIFO, SCHED_RR, SCHED_BATCH ) = range(4) - tuna_glade_dirs = [ ".", "tuna", "/usr/share/tuna" ] tuna_glade = None @@ -76,7 +73,7 @@ def thread_set_attributes(pid, threads, new_policy, new_prio, new_affinity, nr_c changed = False curr_policy = schedutils.get_scheduler(pid) curr_prio = int(threads[pid]["stat"]["rt_priority"]) - if new_policy == SCHED_OTHER: + if new_policy == schedutils.SCHED_OTHER: new_prio = 0 if curr_policy != new_policy or curr_prio != new_prio: try: @@ -190,7 +187,7 @@ class irq_druid: def on_sched_policy_combo_changed(self, button): new_policy = self.sched_policy.get_active() - if new_policy in ( SCHED_FIFO, SCHED_RR ): + if new_policy in (schedutils.SCHED_FIFO, schedutils.SCHED_RR): can_change_pri = True else: can_change_pri = False @@ -556,7 +553,7 @@ class process_druid: def on_sched_policy_combo_changed(self, button): new_policy = self.sched_policy.get_active() - if new_policy in ( SCHED_FIFO, SCHED_RR ): + if new_policy in (schedutils.SCHED_FIFO, schedutils.SCHED_RR): can_change_pri = True else: can_change_pri = False |