from pymin.services.util import Restorable, ConfigWriter, ServiceHandler, \
TransactionalHandler, ListSubHandler
-__ALL__ = ('FirewallHandler', 'Error')
-
-class Error(HandlerError):
- r"""
- Error(command) -> Error instance :: Base FirewallHandler exception class.
-
- All exceptions raised by the FirewallHandler inherits from this one, so you can
- easily catch any FirewallHandler exception.
-
- message - A descriptive error message.
- """
- pass
+__ALL__ = ('FirewallHandler',)
class Rule(Sequence):
r"""Rule(chain, target[, src[, dst[, ...]]]) -> Rule instance.
handler_help = u"Manage firewall service"
- _persistent_attrs = 'rules'
+ _persistent_attrs = ['rules']
_restorable_defaults = dict(rules=list())
self._service_restart = self._service_start
self._service_reload = self._service_start
self._config_build_templates()
- self._restore()
+ ServiceHandler.__init__(self)
self.rule = RuleHandler(self)
def _get_config_vars(self, config_file):