diff --git a/tuned/gtk/gui_plugin_loader.py b/tuned/gtk/gui_plugin_loader.py index 2b3e93b..67fa195 100644 --- a/tuned/gtk/gui_plugin_loader.py +++ b/tuned/gtk/gui_plugin_loader.py @@ -33,7 +33,7 @@ import tuned.consts as consts import tuned.logs import tuned.plugins.repository as repository import configobj as ConfigObj -import tuned.exceptions as TunedException +from tuned.exceptions import TunedException from tuned import plugins from tuned.utils.plugin_loader import PluginLoader @@ -42,7 +42,7 @@ from tuned import storage, units, monitors, plugins, profiles, exports, \ import tuned.plugins as Plugins -__all__ = ['GTKPluginLoader'] +__all__ = ['GuiPluginLoader'] global_config_spec = ['dynamic_tuning = boolean(default=%s)' % consts.CFG_DEF_DYNAMIC_TUNING, diff --git a/tuned/gtk/gui_profile_loader.py b/tuned/gtk/gui_profile_loader.py index 47b2da6..10bd7cd 100644 --- a/tuned/gtk/gui_profile_loader.py +++ b/tuned/gtk/gui_profile_loader.py @@ -123,10 +123,6 @@ class GuiProfileLoader(object): config.write() self._refresh_profiles() - def _refresh_profiles(self): - self.profiles = {} - self._load_all_profiles() - def update_profile( self, old_profile_name, diff --git a/tuned/gtk/managerException.py b/tuned/gtk/managerException.py index 9589b52..958a346 100644 --- a/tuned/gtk/managerException.py +++ b/tuned/gtk/managerException.py @@ -38,10 +38,8 @@ class ManagerException(Exception): return repr(self.code) - def profile_already_exists(self, text): - return repr(text) - - def profile_already_exists(self): - return repr(self.code) - - + def profile_already_exists(self, text=None): + if text is None: + return repr(self.code) + else: + return repr(text)