Fix a traceback in tuned-gui
This commit is contained in:
parent
565b5a038b
commit
088f5e2201
35
0001-tuned-gui-Sort-plugins-based-on-their-name.patch
Normal file
35
0001-tuned-gui-Sort-plugins-based-on-their-name.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From d46834808c3226b3a6e48649df65befc399c21cd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
|
||||
Date: Wed, 11 Jul 2018 00:41:45 +0200
|
||||
Subject: [PATCH] tuned-gui: Sort plugins based on their name
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Previously the sorting was done by comparing the objects themselves,
|
||||
which is not what we want and it doesn't work in Python 3 - TypeError
|
||||
is raised, e.g:
|
||||
TypeError: '<' not supported between instances of 'BootloaderPlugin' and 'MountsPlugin'
|
||||
|
||||
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
|
||||
---
|
||||
tuned-gui.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tuned-gui.py b/tuned-gui.py
|
||||
index 8f72fd5..e486687 100755
|
||||
--- a/tuned-gui.py
|
||||
+++ b/tuned-gui.py
|
||||
@@ -278,7 +278,8 @@ class Base(object):
|
||||
self.treestore_profiles = Gtk.ListStore(GObject.TYPE_STRING,
|
||||
GObject.TYPE_STRING)
|
||||
self.treestore_plugins = Gtk.ListStore(GObject.TYPE_STRING)
|
||||
- for plugin in sorted(self.plugin_loader.plugins):
|
||||
+ for plugin in sorted(self.plugin_loader.plugins,
|
||||
+ key = lambda plugin: plugin.name):
|
||||
self.treestore_plugins.append([plugin.name])
|
||||
self.combobox_plugins = \
|
||||
self.builder.get_object('comboboxPlugins')
|
||||
--
|
||||
2.14.4
|
||||
|
@ -32,7 +32,7 @@
|
||||
Summary: A dynamic adaptive system tuning daemon
|
||||
Name: tuned
|
||||
Version: 2.10.0
|
||||
Release: 3%{?prerel1}%{?dist}
|
||||
Release: 4%{?prerel1}%{?dist}
|
||||
License: GPLv2+
|
||||
Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}.tar.gz#/%{name}-%{version}%{?prerel2}.tar.gz
|
||||
URL: http://www.tuned-project.org/
|
||||
@ -61,6 +61,8 @@ Patch0: tuned-2.10.0-python-3.7-fix.patch
|
||||
Patch1: 0001-tuned-adm-Fix-a-traceback-when-run-without-action-sp.patch
|
||||
# Upstream patch:
|
||||
Patch2: tuned-2.10.0-makefile-full-python-path.patch
|
||||
# Upstream patch:
|
||||
Patch3: 0001-tuned-gui-Sort-plugins-based-on-their-name.patch
|
||||
|
||||
%description
|
||||
The tuned package contains a daemon that tunes system settings dynamically.
|
||||
@ -208,6 +210,7 @@ It can be also used to fine tune your system for specific scenarios.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
|
||||
@ -440,6 +443,9 @@ fi
|
||||
%{_mandir}/man7/tuned-profiles-compat.7*
|
||||
|
||||
%changelog
|
||||
* Wed Jul 11 2018 Ondřej Lysoněk <olysonek@redhat.com> - 2.10.0-4
|
||||
- Fix a traceback in tuned-gui
|
||||
|
||||
* Tue Jul 10 2018 Ondřej Lysoněk <olysonek@redhat.com> - 2.10.0-3
|
||||
- Used python intepreter path from the rpm macro
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user