GUI: Fix some pylint errors
This fixes the following pylint errors: ************* Module tuned.gtk.gui_plugin_loader E:145,18: TunedException is not callable (not-callable) E: 45,11: Undefined variable name 'GTKPluginLoader' in __all__ (undefined-all-variable) ************* Module tuned.gtk.managerException E: 44, 4: method already defined line 41 (function-redefined) ************* Module tuned.gtk.gui_profile_loader E:126, 4: method already defined line 95 (function-redefined) Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
parent
e1632568c6
commit
8e6827c898
3 changed files with 7 additions and 13 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue