Convert to using ABCMeta to get abstract class failures immediately rather than on method use.

This commit is contained in:
Mike Auty
2014-04-14 02:21:13 +01:00
parent c5156c25cb
commit 3da8bdf28a
5 changed files with 38 additions and 21 deletions
+6 -4
View File
@@ -1,18 +1,20 @@
from abc import abstractmethod, ABCMeta
from volatility.framework import validity
__author__ = 'mike'
class Renderer(validity.ValidityRoutines):
__metaclass__ = ABCMeta
def __init__(self, options):
"""Accepts an options object to configure the renderers"""
#FIXME: Once the config option objects are in place, put the type_check in place
@staticmethod
def get_render_options():
@abstractmethod
def get_render_options(self):
"""Returns a list of rendering options"""
raise NotImplementedError("Abstract method get_render_options not implemented.")
@abstractmethod
def render(self, grid):
"""Takes a grid object and renders it based on the object's preferences"""
raise NotImplementedError("Abstract method render not implemented.")