X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/9a326a33b28fb685e681bf63c63be9f820db0356..b9f71ad8a238ed93c7e515cc9602d11700f183ae:/pymin/services/firewall/__init__.py diff --git a/pymin/services/firewall/__init__.py b/pymin/services/firewall/__init__.py index 497087d..d3ae1ed 100644 --- a/pymin/services/firewall/__init__.py +++ b/pymin/services/firewall/__init__.py @@ -8,7 +8,7 @@ from os import path from pymin.seqtools import Sequence from pymin.dispatcher import Handler, handler, HandlerError from pymin.services.util import Restorable, ConfigWriter, ServiceHandler, \ - TransactionalHandler + TransactionalHandler, SubHandler __ALL__ = ('FirewallHandler', 'Error', 'RuleError', 'RuleAlreadyExistsError', 'RuleNotFoundError') @@ -114,7 +114,7 @@ class Rule(Sequence): return (self.chain, self.target, self.src, self.dst, self.protocol, self.src_port, self.dst_port) -class RuleHandler(Handler): +class RuleHandler(SubHandler): r"""RuleHandler(rules) -> RuleHandler instance :: Handle a list of rules. This class is a helper for FirewallHandler to do all the work related to rules @@ -125,10 +125,6 @@ class RuleHandler(Handler): handler_help = u"Manage firewall rules" - def __init__(self, parent): - r"Initialize the object, see class documentation for details." - self.parent = parent - @handler(u'Add a new rule') def add(self, *args, **kwargs): r"add(rule) -> None :: Add a rule to the rules list (see Rule doc)."