chapps.signals module

Signal handlers and custom exceptions

In order to shut down gracefully, we want to provide a signal handler when a service (handler) loop starts. Also, CHAPPS raises a few different custom exceptions, which are defined here.

class chapps.signals.SignalHandlerFactory[source]

Bases: object

A class for containing classmethods to create signal handlers

classmethod signal_handler(loop=None)[source]

Returns a signal-checking, exiting closure



Return type



a closure that looks for SIGTERM or SIGINT and raises SystemExit if it finds either one.

exception chapps.signals.CHAPPSException[source]

Bases: Exception

Parent class for CHAPPS exceptions

exception chapps.signals.CallableExhausted[source]

Bases: chapps.signals.CHAPPSException

A special exception for use during testing

exception chapps.signals.NotAnEmailAddressException[source]

Bases: chapps.signals.CHAPPSException

An email address contained no at-signs

exception chapps.signals.TooManyAtsException[source]

Bases: chapps.signals.CHAPPSException

An email address had too many at-signs in it

exception chapps.signals.ConfigurationError[source]

Bases: chapps.signals.CHAPPSException

There was an error in the setting of configuration elements

exception chapps.signals.OutboundPolicyException[source]

Bases: chapps.signals.CHAPPSException

Parent of exceptions which occur during outbound mail processing

exception chapps.signals.NullSenderException[source]

Bases: chapps.signals.OutboundPolicyException

No sender address exists in the current policy request

exception chapps.signals.AuthenticationFailureException[source]

Bases: chapps.signals.OutboundPolicyException

Lack of user-identifier being treated as authentication failure