Ticket #11: mailsink.patch
| File mailsink.patch, 0.8 kB (added by amcgregor, 1 year ago) |
|---|
-
tests/lib/smtp_mailsink.py
44 44 version = '1.0.1' 45 45 46 46 import asyncore 47 import select 48 import errno 47 49 import copy 48 50 import smtpd 49 51 import threading … … 115 117 def run(self): 116 118 "Just run in a loop until stop() is called." 117 119 while not self.stop_event.isSet(): 118 asyncore.loop(timeout=0.1) 120 try: 121 asyncore.loop(timeout=0.1) 122 except select.error, e: 123 if e.args[0] != errno.EBADF: 124 raise 119 125 120 126 def stop(self, timeout_seconds=5.0): 121 127 """Stop the mailsink and shut down this thread. timeout_seconds
