def init_handler(self):
        """ Check self options. """
        assert self.options.get('host') and self.options.get('port'), "Invalid options"
        assert self.options.get('to'), 'Recipients list is empty. SMTP disabled.'
        if not isinstance(self.options['to'], (list, tuple)):
            self.options['to'] = [self.options['to']]
def init_handler ( self ) : assert self . options . get ( 'host' ) and self . options . get ( 'port' ) , "Invalid options" assert self . options . get ( 'to' ) , 'Recipients list is empty. SMTP disabled.' if not isinstance ( self . options [ 'to' ] , ( list , tuple ) ) : self . options [ 'to' ] = [ self . options [ 'to' ] ]
Check self options.