From 93d872191c6d8b0d4d3df89131f0c0266379d32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Mon, 13 Feb 2017 16:28:33 +0100 Subject: [PATCH] Raise NotImplementedError instead of NotImplemented NotImplemented is not an exception type. This patch makes some pylint errors go away. --- tuned-gui.py | 2 +- tuned/exports/interfaces.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tuned-gui.py b/tuned-gui.py index 3731b34..e9c4628 100755 --- a/tuned-gui.py +++ b/tuned-gui.py @@ -844,7 +844,7 @@ class Base(object): else: self._cmd.execute(['systemctl', 'disable', 'tuned']) else: - raise NotImplemented + raise NotImplementedError() def execute_switch_tuned_admin_functions(self, switch, data): self.is_admin = self.switch_tuned_admin_functions.get_active() diff --git a/tuned/exports/interfaces.py b/tuned/exports/interfaces.py index 85baa2a..99c2c0f 100644 --- a/tuned/exports/interfaces.py +++ b/tuned/exports/interfaces.py @@ -4,18 +4,18 @@ class ExportableInterface(object): class ExporterInterface(object): def export(self, method, in_signature, out_signature): # to be overriden by concrete implementation - raise NotImplemented() + raise NotImplementedError() def signal(self, method, out_signature): # to be overriden by concrete implementation - raise NotImplemented() + raise NotImplementedError() def send_signal(self, signal, *args, **kwargs): # to be overriden by concrete implementation - raise NotImplemented() + raise NotImplementedError() def start(self): - raise NotImplemented() + raise NotImplementedError() def stop(self): - raise NotImplemented() + raise NotImplementedError()