]> git.llucax.com Git - software/pymin.git/blobdiff - pymin/services/dhcp/__init__.py
Alias reload to restart in DhcpHandler (init.d script don't have reload).
[software/pymin.git] / pymin / services / dhcp / __init__.py
index 6e6f19829040f66b8764ac54d3701b26a578b6d2..251553bde18f448f84d4864d654da37f97d10ed6 100644 (file)
@@ -6,20 +6,9 @@ from pymin.seqtools import Sequence
 from pymin.dispatcher import Handler, handler, HandlerError
 from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \
                                 TransactionalHandler, ParametersHandler, \
 from pymin.dispatcher import Handler, handler, HandlerError
 from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \
                                 TransactionalHandler, ParametersHandler, \
-                                DictSubHandler
+                                DictSubHandler, ReloadHandler
 
 
-__ALL__ = ('DhcpHandler', 'Error')
-
-class Error(HandlerError):
-    r"""
-    Error(message) -> Error instance :: Base DhcpHandler exception class.
-
-    All exceptions raised by the DhcpHandler inherits from this one, so you can
-    easily catch any DhcpHandler exception.
-
-    message - A descriptive error message.
-    """
-    pass
+__ALL__ = ('DhcpHandler',)
 
 class Host(Sequence):
     r"""Host(name, ip, mac) -> Host instance :: Class representing a host.
 
 class Host(Sequence):
     r"""Host(name, ip, mac) -> Host instance :: Class representing a host.
@@ -57,8 +46,8 @@ class HostHandler(DictSubHandler):
     _cont_subhandler_attr = 'hosts'
     _cont_subhandler_class = Host
 
     _cont_subhandler_attr = 'hosts'
     _cont_subhandler_class = Host
 
-class DhcpHandler(Restorable, ConfigWriter, InitdHandler, TransactionalHandler,
-                  ParametersHandler):
+class DhcpHandler(Restorable, ConfigWriter, ReloadHandler, TransactionalHandler,
+                  ParametersHandler, InitdHandler):
     r"""DhcpHandler([pickle_dir[, config_dir]]) -> DhcpHandler instance.
 
     Handles DHCP service commands for the dhcpd program.
     r"""DhcpHandler([pickle_dir[, config_dir]]) -> DhcpHandler instance.
 
     Handles DHCP service commands for the dhcpd program.