Daemon terminates unexpected
Steve Horsley
steve.horsley at gmail.com
Fri Feb 10 18:06:35 EST 2006
Incorporating Fredrik's fix (I learned something new reading
that), try using an endless loop even if there is an exception
like this:
def run(self):
while True:
try:
<start an SMTP-Server
asyncore.loop()
except:
e = sys.exc_value()
<write exception in log>
<kill the SMTP server off>
time.sleep(60) # wait, avoid spinning
so that even if there is an exception, it'll get up and go again.
Steve
More information about the Python-list
mailing list