From bcc1df08bcc6fe0bb941e56973c720afd8241e6d Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Tue, 8 Jul 2014 22:02:53 +0100 Subject: [PATCH] Correct mis-ordered decorators. --- volatility/framework/interfaces/plugins.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/volatility/framework/interfaces/plugins.py b/volatility/framework/interfaces/plugins.py index a618c4c20..950372476 100644 --- a/volatility/framework/interfaces/plugins.py +++ b/volatility/framework/interfaces/plugins.py @@ -30,8 +30,8 @@ class PluginInterface(validity.ValidityRoutines): def context(self): return self._context - @abstractmethod @classmethod + @abstractmethod def determine_inputs(cls): """Returns the accepted inputs @@ -39,14 +39,13 @@ class PluginInterface(validity.ValidityRoutines): """ def verify_inputs(self): - """Verifies the inputs basedo on the output of determine_inputs""" + """Verifies the inputs based on the output of determine_inputs""" inputs = self.determine_inputs() for tl_name, tl_type in inputs.items(): layer = self.context.memory.get(tl_name, None) if layer is not None: - if layer.__class__.__name__ != tl_type: - raise TypeError("Layer " + tl_name + " is not of type " + tl_type + " (" + - layer.__class__.__name__ + " instead).") + if not layer.can_handle(tl_type): + raise TypeError("Layer " + tl_name + " cannot handle type " + tl_type + ) else: raise TypeError("Layer " + tl_name + " has not been populated.")