From c37b6220d4bca5984c7c855317d0af31ebe0ec73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Tue, 5 Jun 2018 22:06:53 +0200 Subject: [PATCH] tuned-gui: Fix a traceback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: rhbz#1536835 Fixes #95 Signed-off-by: Ondřej Lysoněk --- tuned-gui.py | 3 ++- tuned/gtk/gui_profile_loader.py | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tuned-gui.py b/tuned-gui.py index 40141f0..8f72fd5 100755 --- a/tuned-gui.py +++ b/tuned-gui.py @@ -686,7 +686,8 @@ class Base(object): def data_to_profile_config(self): name = self.entry_profile_name.get_text() - config = configobj.ConfigObj() + config = configobj.ConfigObj(list_values = False, + interpolation = False) activated = self.combobox_include_profile.get_active() model = self.combobox_include_profile.get_model() diff --git a/tuned/gtk/gui_profile_loader.py b/tuned/gtk/gui_profile_loader.py index eafccb4..e2fe6cf 100644 --- a/tuned/gtk/gui_profile_loader.py +++ b/tuned/gtk/gui_profile_loader.py @@ -65,7 +65,8 @@ class GuiProfileLoader(object): def load_profile_config(self, profile_name, path): conf_path = path + '/' + profile_name + '/' + tuned.consts.PROFILE_FILE - profile_config = configobj.ConfigObj(conf_path) + profile_config = configobj.ConfigObj(conf_path, list_values = False, + interpolation = False) return profile_config def _locate_profile_path(self, profile_name): @@ -97,7 +98,7 @@ class GuiProfileLoader(object): def save_profile(self, profile): path = tuned.consts.LOAD_DIRECTORIES[1] + '/' + profile.name - config = configobj.ConfigObj() + config = configobj.ConfigObj(list_values = False, interpolation = False) config.filename = path + '/' + tuned.consts.PROFILE_FILE config.initial_comment = ('#', 'tuned configuration', '#') @@ -140,7 +141,7 @@ class GuiProfileLoader(object): if old_profile_name != profile.name: self.remove_profile(old_profile_name, is_admin=is_admin) - config = configobj.ConfigObj() + config = configobj.ConfigObj(list_values = False, interpolation = False) config.filename = path + '/' + tuned.consts.PROFILE_FILE config.initial_comment = ('#', 'tuned configuration', '#') try: