From: Leandro Lucarella Date: Tue, 16 Oct 2007 03:28:36 +0000 (-0300) Subject: Remove unused error classes. X-Git-Url: https://git.llucax.com/software/pymin.git/commitdiff_plain/0b364a7665d79821e7bc417a97b3cbb8ad10dcc3?ds=inline Remove unused error classes. --- diff --git a/pymin/services/dhcp/__init__.py b/pymin/services/dhcp/__init__.py index 6e6f198..7f0bb7d 100644 --- a/pymin/services/dhcp/__init__.py +++ b/pymin/services/dhcp/__init__.py @@ -8,18 +8,7 @@ from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \ TransactionalHandler, ParametersHandler, \ DictSubHandler -__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. diff --git a/pymin/services/firewall/__init__.py b/pymin/services/firewall/__init__.py index 90d3ee9..71a9548 100644 --- a/pymin/services/firewall/__init__.py +++ b/pymin/services/firewall/__init__.py @@ -10,18 +10,7 @@ from pymin.dispatcher import Handler, handler, HandlerError 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. diff --git a/pymin/services/nat/__init__.py b/pymin/services/nat/__init__.py index c22783f..4724fba 100644 --- a/pymin/services/nat/__init__.py +++ b/pymin/services/nat/__init__.py @@ -8,18 +8,7 @@ from pymin.services.util import Restorable, ConfigWriter, RestartHandler, \ ReloadHandler, TransactionalHandler, \ ListSubHandler, call -__ALL__ = ('NatHandler', 'Error') - -class Error(HandlerError): - r""" - Error(command) -> Error instance :: Base NatHandler exception class. - - All exceptions raised by the NatHandler inherits from this one, so you can - easily catch any NatHandler exception. - - message - A descriptive error message. - """ - pass +__ALL__ = ('NatHandler',) class PortForward(Sequence): r"""PortForward(dev, protocol, port, dst[, dst_port[, ...]]) -> PortForward. diff --git a/pymin/services/ppp/__init__.py b/pymin/services/ppp/__init__.py index 028eb91..0445df1 100644 --- a/pymin/services/ppp/__init__.py +++ b/pymin/services/ppp/__init__.py @@ -7,18 +7,7 @@ from pymin.dispatcher import Handler, handler, HandlerError from pymin.services.util import Restorable, ConfigWriter \ ,TransactionalHandler, DictSubHandler, call -__ALL__ = ('PppHandler') - -class Error(HandlerError): - r""" - Error(command) -> Error instance :: Base ConnectionHandler exception class. - - All exceptions raised by the ConnectionHandler inherits from this one, so you can - easily catch any ConnectionHandler exception. - - message - A descriptive error message. - """ - pass +__ALL__ = ('PppHandler',) class ConnectionError(Error, KeyError): r""" diff --git a/pymin/services/proxy/__init__.py b/pymin/services/proxy/__init__.py index 85bafd8..715b0ab 100644 --- a/pymin/services/proxy/__init__.py +++ b/pymin/services/proxy/__init__.py @@ -10,18 +10,7 @@ from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \ import crypt -__ALL__ = ('ProxyHandler', 'Error') - -class Error(HandlerError): - r""" - Error(command) -> Error instance :: Base DnsHandler exception class. - - All exceptions raised by the DnsHandler inherits from this one, so you can - easily catch any DnsHandler exception. - - message - A descriptive error message. - """ - pass +__ALL__ = ('ProxyHandler',) class Host(Sequence): def __init__(self,ip): diff --git a/pymin/services/vrrp/__init__.py b/pymin/services/vrrp/__init__.py index 8f5a003..393f90c 100644 --- a/pymin/services/vrrp/__init__.py +++ b/pymin/services/vrrp/__init__.py @@ -7,7 +7,7 @@ from pymin.seqtools import Sequence from pymin.dispatcher import Handler, handler, HandlerError from pymin.services.util import Restorable, TransactionalHandler, ParametersHandler, call -__ALL__ = ('VrrpHandler') +__ALL__ = ('VrrpHandler',) pid_filename = 'vrrp.pid'