From df4a4d5e8d038092e981e8da1a8b94c2acdcdadf Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sun, 10 Jan 2016 16:30:37 +0000 Subject: [PATCH] Remove abstract method from classmethods (since it won't error if the abstract method isn't implemented until instantiation. --- volatility/framework/interfaces/configuration.py | 2 +- volatility/framework/interfaces/objects.py | 3 +-- volatility/framework/interfaces/plugins.py | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/volatility/framework/interfaces/configuration.py b/volatility/framework/interfaces/configuration.py index 17c57ee55..2496cb797 100644 --- a/volatility/framework/interfaces/configuration.py +++ b/volatility/framework/interfaces/configuration.py @@ -33,7 +33,7 @@ def schema_name_split(path): return path.split(SCHEMA_NAME_DIVIDER) -class ConfigurationSchemaNode(validity.ValidityRoutines): +class ConfigurationSchemaNode(validity.ValidityRoutines, metaclass = ABCMeta): """Class to distinguish configuration elements from everything else""" def __init__(self, name, description = None, default = None, optional = False): diff --git a/volatility/framework/interfaces/objects.py b/volatility/framework/interfaces/objects.py index 0c46af76e..e52b1b29f 100644 --- a/volatility/framework/interfaces/objects.py +++ b/volatility/framework/interfaces/objects.py @@ -87,13 +87,12 @@ class ObjectInterface(validity.ValidityRoutines, metaclass = ABCMeta): object_info = ObjectInformation(layer_name = self.vol.layer_name, offset = self.vol.offset)) - class VolTemplateProxy(object, metaclass = ABCMeta): + class VolTemplateProxy(object): """A container for proxied methods that the ObjectTemplate of this object will call. They are class methods rather than static methods, to allow for code reuse.""" @classmethod - @abstractmethod def size(cls, template): """Returns the size of the template object""" diff --git a/volatility/framework/interfaces/plugins.py b/volatility/framework/interfaces/plugins.py index 6e768c4e4..f77dad73b 100644 --- a/volatility/framework/interfaces/plugins.py +++ b/volatility/framework/interfaces/plugins.py @@ -38,7 +38,6 @@ class PluginInterface(validity.ValidityRoutines, configuration_interface.Configu return self._context @classmethod - @abstractmethod def get_schema(cls): """Returns a list of configuration schema items""" return []