Пример #1
0
 def reset(self):
     # Base class is old-style.
     QueueServer.reset(self)
     # Consume everything out of the queue.
     while True:
         try:
             self.queue.get_nowait()
         except queue.Empty:
             break
Пример #2
0
 def reset(self):
     # Base class is old-style.
     QueueServer.reset(self)
     # Consume everything out of the queue.
     while True:
         try:
             self.queue.get_nowait()
         except queue.Empty:
             break
Пример #3
0
    def __init__(self, host, port, queue, oob_queue, err_queue):
        """See `lazr.smtptest.server.QueueServer`.

        :param oob_queue: A queue for communicating information back to the
            controller, e.g. statistics.
        :type oob_queue: `Queue.Queue`
        :param err_queue: A queue for allowing the controller to request SMTP
            errors from the server.
        :type err_queue: `Queue.Queue`
        """
        QueueServer.__init__(self, host, port, queue)
        self._connection_count = 0
        self.last_auth = None
        # The out-of-band queue is where the server sends statistics to the
        # controller upon request.
        self._oob_queue = oob_queue
        self._err_queue = err_queue
        self._last_error = None
Пример #4
0
    def __init__(self, host, port, queue, oob_queue, err_queue):
        """See `lazr.smtptest.server.QueueServer`.

        :param oob_queue: A queue for communicating information back to the
            controller, e.g. statistics.
        :type oob_queue: `Queue.Queue`
        :param err_queue: A queue for allowing the controller to request SMTP
            errors from the server.
        :type err_queue: `Queue.Queue`
        """
        QueueServer.__init__(self, host, port, queue)
        self._connection_count = 0
        self.last_auth = None
        # The out-of-band queue is where the server sends statistics to the
        # controller upon request.
        self._oob_queue = oob_queue
        self._err_queue = err_queue
        self._last_error = None
Пример #5
0
 def reset(self):
     """See `lazr.smtp.server.Server`."""
     QueueServer.reset(self)
     self._connection_count = 0
Пример #6
0
 def process_message(self, peer, mailfrom, rcpttos, data):
     # Provide a guaranteed order to recpttos.
     QueueServer.process_message(
         self, peer, mailfrom, sorted(rcpttos), data)
Пример #7
0
 def reset(self):
     """See `lazr.smtp.server.Server`."""
     QueueServer.reset(self)
     self._connection_count = 0
Пример #8
0
 def process_message(self, peer, mailfrom, rcpttos, data):
     # Provide a guaranteed order to recpttos.
     QueueServer.process_message(self, peer, mailfrom, sorted(rcpttos),
                                 data)