diff --git a/tuned/daemon/controller.py b/tuned/daemon/controller.py index c0adb75..9cde2d6 100644 --- a/tuned/daemon/controller.py +++ b/tuned/daemon/controller.py @@ -17,7 +17,7 @@ class Controller(tuned.exports.interfaces.ExportableInterface): """ def __init__(self, daemon, global_config): - super(self.__class__, self).__init__() + super(Controller, self).__init__() self._daemon = daemon self._global_config = global_config self._terminate = threading.Event() diff --git a/tuned/exports/controller.py b/tuned/exports/controller.py index b33497d..611e9b4 100644 --- a/tuned/exports/controller.py +++ b/tuned/exports/controller.py @@ -8,7 +8,7 @@ class ExportsController(tuned.patterns.Singleton): """ def __init__(self): - super(self.__class__, self).__init__() + super(ExportsController, self).__init__() self._exporters = [] self._objects = [] self._exports_initialized = False diff --git a/tuned/logs.py b/tuned/logs.py index b34c002..e3da574 100644 --- a/tuned/logs.py +++ b/tuned/logs.py @@ -36,7 +36,7 @@ class TunedLogger(logging.getLoggerClass()): _file_handler = None def __init__(self, *args, **kwargs): - super(self.__class__, self).__init__(*args, **kwargs) + super(TunedLogger, self).__init__(*args, **kwargs) self.setLevel(logging.INFO) self.switch_to_console() diff --git a/tuned/monitors/repository.py b/tuned/monitors/repository.py index 445da16..cc89e0d 100644 --- a/tuned/monitors/repository.py +++ b/tuned/monitors/repository.py @@ -9,7 +9,7 @@ __all__ = ["Repository"] class Repository(PluginLoader): def __init__(self): - super(self.__class__, self).__init__() + super(Repository, self).__init__() self._monitors = set() @property diff --git a/tuned/plugins/plugin_bootloader.py b/tuned/plugins/plugin_bootloader.py index 9987c90..a0dca11 100644 --- a/tuned/plugins/plugin_bootloader.py +++ b/tuned/plugins/plugin_bootloader.py @@ -22,7 +22,7 @@ class BootloaderPlugin(base.Plugin): def __init__(self, *args, **kwargs): if not os.path.isfile(consts.GRUB2_TUNED_TEMPLATE_PATH): raise exceptions.NotSupportedPluginException("Required GRUB2 template not found, disabling plugin.") - super(self.__class__, self).__init__(*args, **kwargs) + super(BootloaderPlugin, self).__init__(*args, **kwargs) self._cmd = commands() def _instance_init(self, instance): diff --git a/tuned/plugins/plugin_cpu.py b/tuned/plugins/plugin_cpu.py index 624b782..6a5ea36 100644 --- a/tuned/plugins/plugin_cpu.py +++ b/tuned/plugins/plugin_cpu.py @@ -19,7 +19,7 @@ class CPULatencyPlugin(base.Plugin): """ def __init__(self, *args, **kwargs): - super(self.__class__, self).__init__(*args, **kwargs) + super(CPULatencyPlugin, self).__init__(*args, **kwargs) self._has_pm_qos = True self._has_energy_perf_bias = True @@ -142,7 +142,7 @@ class CPULatencyPlugin(base.Plugin): return v def _instance_apply_static(self, instance): - super(self.__class__, self)._instance_apply_static(instance) + super(CPULatencyPlugin, self)._instance_apply_static(instance) if not instance._first_instance: return @@ -156,7 +156,7 @@ class CPULatencyPlugin(base.Plugin): self._no_turbo_save = self._getset_intel_pstate_attr("no_turbo", instance.options["no_turbo"]) def _instance_unapply_static(self, instance, full_rollback = False): - super(self.__class__, self)._instance_unapply_static(instance, full_rollback) + super(CPULatencyPlugin, self)._instance_unapply_static(instance, full_rollback) if instance._first_instance and self._has_intel_pstate: self._set_intel_pstate_attr("min_perf_pct", self._min_perf_pct_save) diff --git a/tuned/plugins/plugin_disk.py b/tuned/plugins/plugin_disk.py index c1f743a..04f2dee 100644 --- a/tuned/plugins/plugin_disk.py +++ b/tuned/plugins/plugin_disk.py @@ -15,7 +15,7 @@ class DiskPlugin(hotplug.Plugin): """ def __init__(self, *args, **kwargs): - super(self.__class__, self).__init__(*args, **kwargs) + super(DiskPlugin, self).__init__(*args, **kwargs) self._power_levels = [254, 225, 195, 165, 145, 125, 105, 85, 70, 55, 30, 20] self._spindown_levels = [0, 250, 230, 210, 190, 170, 150, 130, 110, 90, 70, 60] @@ -51,17 +51,17 @@ class DiskPlugin(hotplug.Plugin): def _hardware_events_callback(self, event, device): if self._device_is_supported(device): - super(self.__class__, self)._hardware_events_callback(event, device) + super(DiskPlugin, self)._hardware_events_callback(event, device) def _added_device_apply_tuning(self, instance, device_name): if instance._load_monitor is not None: instance._load_monitor.add_device(device_name) - super(self.__class__, self)._added_device_apply_tuning(instance, device_name) + super(DiskPlugin, self)._added_device_apply_tuning(instance, device_name) def _removed_device_unapply_tuning(self, instance, device_name): if instance._load_monitor is not None: instance._load_monitor.remove_device(device_name) - super(self.__class__, self)._removed_device_unapply_tuning(instance, device_name) + super(DiskPlugin, self)._removed_device_unapply_tuning(instance, device_name) @classmethod def _get_config_options(cls): diff --git a/tuned/plugins/plugin_eeepc_she.py b/tuned/plugins/plugin_eeepc_she.py index 73572ae..3733a81 100644 --- a/tuned/plugins/plugin_eeepc_she.py +++ b/tuned/plugins/plugin_eeepc_she.py @@ -18,7 +18,7 @@ class EeePCSHEPlugin(base.Plugin): self._control_file = "/sys/devices/platform/eeepc-wmi/cpufv" if not os.path.isfile(self._control_file): raise exceptions.NotSupportedPluginException("Plugin is not supported on your hardware.") - super(self.__class__, self).__init__(*args, **kwargs) + super(EeePCSHEPlugin, self).__init__(*args, **kwargs) @classmethod def _get_config_options(self): diff --git a/tuned/plugins/plugin_modules.py b/tuned/plugins/plugin_modules.py index 2d117f0..241a58b 100644 --- a/tuned/plugins/plugin_modules.py +++ b/tuned/plugins/plugin_modules.py @@ -15,7 +15,7 @@ class ModulesPlugin(base.Plugin): """ def __init__(self, *args, **kwargs): - super(self.__class__, self).__init__(*args, **kwargs) + super(ModulesPlugin, self).__init__(*args, **kwargs) self._has_dynamic_options = True self._cmd = commands() diff --git a/tuned/plugins/plugin_net.py b/tuned/plugins/plugin_net.py index ed1ac2d..d4a3dac 100644 --- a/tuned/plugins/plugin_net.py +++ b/tuned/plugins/plugin_net.py @@ -16,7 +16,7 @@ class NetTuningPlugin(base.Plugin): """ def __init__(self, *args, **kwargs): - super(self.__class__, self).__init__(*args, **kwargs) + super(NetTuningPlugin, self).__init__(*args, **kwargs) self._load_smallest = 0.05 self._level_steps = 6 self._cmd = commands() diff --git a/tuned/plugins/plugin_scheduler.py b/tuned/plugins/plugin_scheduler.py index 0ad96ed..4939cd2 100644 --- a/tuned/plugins/plugin_scheduler.py +++ b/tuned/plugins/plugin_scheduler.py @@ -29,7 +29,7 @@ class SchedulerPlugin(base.Plugin): "SCHED_OTHER":"o", "SCHED_IDLE":"i"} def __init__(self, monitor_repository, storage_factory, hardware_inventory, device_matcher, device_matcher_udev, plugin_instance_factory, global_cfg, variables): - super(self.__class__, self).__init__(monitor_repository, storage_factory, hardware_inventory, device_matcher, device_matcher_udev, plugin_instance_factory, global_cfg, variables) + super(SchedulerPlugin, self).__init__(monitor_repository, storage_factory, hardware_inventory, device_matcher, device_matcher_udev, plugin_instance_factory, global_cfg, variables) self._has_dynamic_options = True self._daemon = consts.CFG_DEF_DAEMON self._sleep_interval = int(consts.CFG_DEF_SLEEP_INTERVAL) @@ -240,7 +240,7 @@ class SchedulerPlugin(base.Plugin): self._set_affinity(pid, affinity, no_error) def _instance_apply_static(self, instance): - super(self.__class__, self)._instance_apply_static(instance) + super(SchedulerPlugin, self)._instance_apply_static(instance) ps = self.get_processes() if ps is None: log.error("error applying tuning, cannot get information about running processes") @@ -275,7 +275,7 @@ class SchedulerPlugin(base.Plugin): instance._thread.start() def _instance_unapply_static(self, instance, full_rollback = False): - super(self.__class__, self)._instance_unapply_static(instance, full_rollback) + super(SchedulerPlugin, self)._instance_unapply_static(instance, full_rollback) ps = self.get_processes() if self._daemon and instance._runtime_tuning: instance._terminate.set() diff --git a/tuned/plugins/plugin_script.py b/tuned/plugins/plugin_script.py index 8685025..05d3eeb 100644 --- a/tuned/plugins/plugin_script.py +++ b/tuned/plugins/plugin_script.py @@ -49,12 +49,12 @@ class ScriptPlugin(base.Plugin): return True def _instance_apply_static(self, instance): - super(self.__class__, self)._instance_apply_static(instance) + super(ScriptPlugin, self)._instance_apply_static(instance) self._call_scripts(instance._scripts, ["start"]) def _instance_verify_static(self, instance, ignore_missing): ret = True - if super(self.__class__, self)._instance_verify_static(instance, ignore_missing) == False: + if super(ScriptPlugin, self)._instance_verify_static(instance, ignore_missing) == False: ret = False args = ["verify"] if ignore_missing: @@ -71,4 +71,4 @@ class ScriptPlugin(base.Plugin): if full_rollback: args = args + ["full_rollback"] self._call_scripts(reversed(instance._scripts), args) - super(self.__class__, self)._instance_unapply_static(instance, full_rollback) + super(ScriptPlugin, self)._instance_unapply_static(instance, full_rollback) diff --git a/tuned/plugins/plugin_scsi_host.py b/tuned/plugins/plugin_scsi_host.py index 49fdee5..adca07b 100644 --- a/tuned/plugins/plugin_scsi_host.py +++ b/tuned/plugins/plugin_scsi_host.py @@ -15,7 +15,7 @@ class SCSIHostPlugin(hotplug.Plugin): """ def __init__(self, *args, **kwargs): - super(self.__class__, self).__init__(*args, **kwargs) + super(SCSIHostPlugin, self).__init__(*args, **kwargs) self._cmd = commands() @@ -43,13 +43,13 @@ class SCSIHostPlugin(hotplug.Plugin): def _hardware_events_callback(self, event, device): if self._device_is_supported(device): - super(self.__class__, self)._hardware_events_callback(event, device) + super(SCSIHostPlugin, self)._hardware_events_callback(event, device) def _added_device_apply_tuning(self, instance, device_name): - super(self.__class__, self)._added_device_apply_tuning(instance, device_name) + super(SCSIHostPlugin, self)._added_device_apply_tuning(instance, device_name) def _removed_device_unapply_tuning(self, instance, device_name): - super(self.__class__, self)._removed_device_unapply_tuning(instance, device_name) + super(SCSIHostPlugin, self)._removed_device_unapply_tuning(instance, device_name) @classmethod def _get_config_options(cls): diff --git a/tuned/plugins/plugin_selinux.py b/tuned/plugins/plugin_selinux.py index 0faec87..b244d3c 100644 --- a/tuned/plugins/plugin_selinux.py +++ b/tuned/plugins/plugin_selinux.py @@ -27,7 +27,7 @@ class SelinuxPlugin(base.Plugin): if self._selinux_path is None: raise exceptions.NotSupportedPluginException("SELinux is not enabled on your system or incompatible version is used.") self._cache_threshold_path = os.path.join(self._selinux_path, "avc", "cache_threshold") - super(self.__class__, self).__init__(*args, **kwargs) + super(SelinuxPlugin, self).__init__(*args, **kwargs) @classmethod def _get_config_options(self): diff --git a/tuned/plugins/plugin_sysctl.py b/tuned/plugins/plugin_sysctl.py index 4e8904a..e4e573b 100644 --- a/tuned/plugins/plugin_sysctl.py +++ b/tuned/plugins/plugin_sysctl.py @@ -14,7 +14,7 @@ class SysctlPlugin(base.Plugin): """ def __init__(self, *args, **kwargs): - super(self.__class__, self).__init__(*args, **kwargs) + super(SysctlPlugin, self).__init__(*args, **kwargs) self._has_dynamic_options = True self._cmd = commands() diff --git a/tuned/plugins/plugin_sysfs.py b/tuned/plugins/plugin_sysfs.py index c7f56ab..e0b9f80 100644 --- a/tuned/plugins/plugin_sysfs.py +++ b/tuned/plugins/plugin_sysfs.py @@ -17,7 +17,7 @@ class SysfsPlugin(base.Plugin): # TODO: resolve possible conflicts with sysctl settings from other plugins def __init__(self, *args, **kwargs): - super(self.__class__, self).__init__(*args, **kwargs) + super(SysfsPlugin, self).__init__(*args, **kwargs) self._has_dynamic_options = True self._cmd = commands() diff --git a/tuned/plugins/plugin_systemd.py b/tuned/plugins/plugin_systemd.py index da11252..472a800 100644 --- a/tuned/plugins/plugin_systemd.py +++ b/tuned/plugins/plugin_systemd.py @@ -20,7 +20,7 @@ class SystemdPlugin(base.Plugin): def __init__(self, *args, **kwargs): if not os.path.isfile(consts.SYSTEMD_SYSTEM_CONF_FILE): raise exceptions.NotSupportedPluginException("Required systemd '%s' configuration file not found, disabling plugin." % consts.SYSTEMD_SYSTEM_CONF_FILE) - super(self.__class__, self).__init__(*args, **kwargs) + super(SystemdPlugin, self).__init__(*args, **kwargs) self._cmd = commands() def _instance_init(self, instance): diff --git a/tuned/plugins/repository.py b/tuned/plugins/repository.py index e1ef9e6..94b137d 100644 --- a/tuned/plugins/repository.py +++ b/tuned/plugins/repository.py @@ -9,7 +9,7 @@ __all__ = ["Repository"] class Repository(PluginLoader): def __init__(self, monitor_repository, storage_factory, hardware_inventory, device_matcher, device_matcher_udev, plugin_instance_factory, global_cfg, variables): - super(self.__class__, self).__init__() + super(Repository, self).__init__() self._plugins = set() self._monitor_repository = monitor_repository self._storage_factory = storage_factory diff --git a/tuned/profiles/functions/function_assertion.py b/tuned/profiles/functions/function_assertion.py index 375bb5c..b8e118b 100644 --- a/tuned/profiles/functions/function_assertion.py +++ b/tuned/profiles/functions/function_assertion.py @@ -14,10 +14,10 @@ class assertion(base.Function): """ def __init__(self): # 2 arguments - super(self.__class__, self).__init__("assertion", 3) + super(assertion, self).__init__("assertion", 3) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(assertion, self).execute(args): return None if args[1] != args[2]: log.error("assertion '%s' failed: '%s' != '%s'" % (args[0], args[1], args[2])) diff --git a/tuned/profiles/functions/function_assertion_non_equal.py b/tuned/profiles/functions/function_assertion_non_equal.py index 1fbeb00..eb6874f 100644 --- a/tuned/profiles/functions/function_assertion_non_equal.py +++ b/tuned/profiles/functions/function_assertion_non_equal.py @@ -14,10 +14,10 @@ class assertion_non_equal(base.Function): """ def __init__(self): # 2 arguments - super(self.__class__, self).__init__("assertion_non_equal", 3) + super(assertion_non_equal, self).__init__("assertion_non_equal", 3) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(assertion_non_equal, self).execute(args): return None if args[1] == args[2]: log.error("assertion '%s' failed: '%s' == '%s'" % (args[0], args[1], args[2])) diff --git a/tuned/profiles/functions/function_cpulist2hex.py b/tuned/profiles/functions/function_cpulist2hex.py index d5db650..4a6c548 100644 --- a/tuned/profiles/functions/function_cpulist2hex.py +++ b/tuned/profiles/functions/function_cpulist2hex.py @@ -11,9 +11,9 @@ class cpulist2hex(base.Function): """ def __init__(self): # arbitrary number of arguments - super(self.__class__, self).__init__("cpulist2hex", 0) + super(cpulist2hex, self).__init__("cpulist2hex", 0) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(cpulist2hex, self).execute(args): return None return self._cmd.cpulist2hex(",,".join(args)) diff --git a/tuned/profiles/functions/function_cpulist2hex_invert.py b/tuned/profiles/functions/function_cpulist2hex_invert.py index 42a3a77..72e4968 100644 --- a/tuned/profiles/functions/function_cpulist2hex_invert.py +++ b/tuned/profiles/functions/function_cpulist2hex_invert.py @@ -11,10 +11,10 @@ class cpulist2hex_invert(base.Function): """ def __init__(self): # arbitrary number of arguments - super(self.__class__, self).__init__("cpulist2hex_invert", 0) + super(cpulist2hex_invert, self).__init__("cpulist2hex_invert", 0) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(cpulist2hex_invert, self).execute(args): return None # current implementation inverts the CPU list and then converts it to hexmask return self._cmd.cpulist2hex(",".join(str(v) for v in self._cmd.cpulist_invert(",,".join(args)))) diff --git a/tuned/profiles/functions/function_cpulist_invert.py b/tuned/profiles/functions/function_cpulist_invert.py index b102cf5..375eb67 100644 --- a/tuned/profiles/functions/function_cpulist_invert.py +++ b/tuned/profiles/functions/function_cpulist_invert.py @@ -14,9 +14,9 @@ class cpulist_invert(base.Function): """ def __init__(self): # arbitrary number of arguments - super(self.__class__, self).__init__("cpulist_invert", 0) + super(cpulist_invert, self).__init__("cpulist_invert", 0) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(cpulist_invert, self).execute(args): return None return ",".join(str(v) for v in self._cmd.cpulist_invert(",,".join(args))) diff --git a/tuned/profiles/functions/function_cpulist_online.py b/tuned/profiles/functions/function_cpulist_online.py index 7315b8a..1badf3d 100644 --- a/tuned/profiles/functions/function_cpulist_online.py +++ b/tuned/profiles/functions/function_cpulist_online.py @@ -12,10 +12,10 @@ class cpulist_online(base.Function): """ def __init__(self): # arbitrary number of arguments - super(self.__class__, self).__init__("cpulist_online", 0) + super(cpulist_online, self).__init__("cpulist_online", 0) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(cpulist_online, self).execute(args): return None cpus = self._cmd.cpulist_unpack(",".join(args)) online = self._cmd.cpulist_unpack(self._cmd.read_file("/sys/devices/system/cpu/online")) diff --git a/tuned/profiles/functions/function_cpulist_pack.py b/tuned/profiles/functions/function_cpulist_pack.py index 3ce0537..5ca3970 100644 --- a/tuned/profiles/functions/function_cpulist_pack.py +++ b/tuned/profiles/functions/function_cpulist_pack.py @@ -13,9 +13,9 @@ class cpulist_pack(base.Function): """ def __init__(self): # arbitrary number of arguments - super(self.__class__, self).__init__("cpulist_pack", 0) + super(cpulist_pack, self).__init__("cpulist_pack", 0) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(cpulist_pack, self).execute(args): return None return ",".join(str(v) for v in self._cmd.cpulist_pack(",,".join(args))) diff --git a/tuned/profiles/functions/function_cpulist_present.py b/tuned/profiles/functions/function_cpulist_present.py index 211afdf..79a945f 100644 --- a/tuned/profiles/functions/function_cpulist_present.py +++ b/tuned/profiles/functions/function_cpulist_present.py @@ -12,10 +12,10 @@ class cpulist_present(base.Function): """ def __init__(self): # arbitrary number of arguments - super(self.__class__, self).__init__("cpulist_present", 0) + super(cpulist_present, self).__init__("cpulist_present", 0) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(cpulist_present, self).execute(args): return None cpus = self._cmd.cpulist_unpack(",,".join(args)) present = self._cmd.cpulist_unpack(self._cmd.read_file("/sys/devices/system/cpu/present")) diff --git a/tuned/profiles/functions/function_cpulist_unpack.py b/tuned/profiles/functions/function_cpulist_unpack.py index 088ca4b..cf07efe 100644 --- a/tuned/profiles/functions/function_cpulist_unpack.py +++ b/tuned/profiles/functions/function_cpulist_unpack.py @@ -11,9 +11,9 @@ class cpulist_unpack(base.Function): """ def __init__(self): # arbitrary number of arguments - super(self.__class__, self).__init__("cpulist_unpack", 0) + super(cpulist_unpack, self).__init__("cpulist_unpack", 0) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(cpulist_unpack, self).execute(args): return None return ",".join(str(v) for v in self._cmd.cpulist_unpack(",,".join(args))) diff --git a/tuned/profiles/functions/function_exec.py b/tuned/profiles/functions/function_exec.py index 6abbf91..45886fe 100644 --- a/tuned/profiles/functions/function_exec.py +++ b/tuned/profiles/functions/function_exec.py @@ -9,10 +9,10 @@ class execute(base.Function): """ def __init__(self): # unlimited number of arguments, min 1 argument (the name of executable) - super(self.__class__, self).__init__("exec", 0, 1) + super(execute, self).__init__("exec", 0, 1) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(execute, self).execute(args): return None (ret, out) = self._cmd.execute(args) if ret == 0: diff --git a/tuned/profiles/functions/function_hex2cpulist.py b/tuned/profiles/functions/function_hex2cpulist.py index 3a32064..449186c 100644 --- a/tuned/profiles/functions/function_hex2cpulist.py +++ b/tuned/profiles/functions/function_hex2cpulist.py @@ -11,9 +11,9 @@ class hex2cpulist(base.Function): """ def __init__(self): # one argument - super(self.__class__, self).__init__("hex2cpulist", 1) + super(hex2cpulist, self).__init__("hex2cpulist", 1) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(hex2cpulist, self).execute(args): return None return ",".join(str(v) for v in self._cmd.hex2cpulist(args[0])) diff --git a/tuned/profiles/functions/function_kb2s.py b/tuned/profiles/functions/function_kb2s.py index af5f39b..7506aec 100644 --- a/tuned/profiles/functions/function_kb2s.py +++ b/tuned/profiles/functions/function_kb2s.py @@ -9,10 +9,10 @@ class kb2s(base.Function): """ def __init__(self): # one argument - super(self.__class__, self).__init__("kb2s", 1) + super(kb2s, self).__init__("kb2s", 1) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(kb2s, self).execute(args): return None try: return str(int(args[0]) * 2) diff --git a/tuned/profiles/functions/function_s2kb.py b/tuned/profiles/functions/function_s2kb.py index 79209c1..27e3ad7 100644 --- a/tuned/profiles/functions/function_s2kb.py +++ b/tuned/profiles/functions/function_s2kb.py @@ -9,10 +9,10 @@ class s2kb(base.Function): """ def __init__(self): # one argument - super(self.__class__, self).__init__("s2kb", 1) + super(s2kb, self).__init__("s2kb", 1) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(s2kb, self).execute(args): return None try: return str(int(args[0]) / 2) diff --git a/tuned/profiles/functions/function_strip.py b/tuned/profiles/functions/function_strip.py index 3af41e8..2b2f4de 100644 --- a/tuned/profiles/functions/function_strip.py +++ b/tuned/profiles/functions/function_strip.py @@ -9,9 +9,9 @@ class strip(base.Function): """ def __init__(self): # unlimited number of arguments, min 1 argument - super(self.__class__, self).__init__("strip", 0, 1) + super(strip, self).__init__("strip", 0, 1) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(strip, self).execute(args): return None return "".join(args).strip() diff --git a/tuned/profiles/functions/function_virt_check.py b/tuned/profiles/functions/function_virt_check.py index 7ea3817..91df3ee 100644 --- a/tuned/profiles/functions/function_virt_check.py +++ b/tuned/profiles/functions/function_virt_check.py @@ -11,10 +11,10 @@ class virt_check(base.Function): """ def __init__(self): # 2 arguments - super(self.__class__, self).__init__("virt_check", 2) + super(virt_check, self).__init__("virt_check", 2) def execute(self, args): - if not super(self.__class__, self).execute(args): + if not super(virt_check, self).execute(args): return None (ret, out) = self._cmd.execute(["virt-what"]) if ret == 0 and len(out) > 0: diff --git a/tuned/profiles/functions/repository.py b/tuned/profiles/functions/repository.py index aa7cfd3..0dc1d43 100644 --- a/tuned/profiles/functions/repository.py +++ b/tuned/profiles/functions/repository.py @@ -9,7 +9,7 @@ log = tuned.logs.get() class Repository(PluginLoader): def __init__(self): - super(self.__class__, self).__init__() + super(Repository, self).__init__() self._functions = {} @property diff --git a/tuned/units/manager.py b/tuned/units/manager.py index d48fe9d..77355e7 100644 --- a/tuned/units/manager.py +++ b/tuned/units/manager.py @@ -14,7 +14,7 @@ class Manager(object): """ def __init__(self, plugins_repository, monitors_repository, def_instance_priority): - super(self.__class__, self).__init__() + super(Manager, self).__init__() self._plugins_repository = plugins_repository self._monitors_repository = monitors_repository self._def_instance_priority = def_instance_priority