代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/tuned 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。