catch errors when trying to bind the SMTP server (closes #485)
This commit is contained in:
parent
cc2f4f33b7
commit
97ccd6ecc2
1 changed files with 6 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ import sys
|
|||
import logging
|
||||
import asyncore
|
||||
import subprocess
|
||||
import socket
|
||||
|
||||
from weboob.core import Weboob, CallErrors
|
||||
from weboob.core.scheduler import Scheduler
|
||||
|
|
@ -59,7 +60,11 @@ class MonboobScheduler(Scheduler):
|
|||
else:
|
||||
host = '127.0.0.1'
|
||||
port = self.app.options.smtpd
|
||||
FakeSMTPD(self.app, host, int(port))
|
||||
try:
|
||||
FakeSMTPD(self.app, host, int(port))
|
||||
except socket.error, e:
|
||||
self.logger.error('Unable to start the SMTP daemon: %s' % e)
|
||||
return False
|
||||
|
||||
# XXX Fuck, we shouldn't copy this piece of code from
|
||||
# weboob.scheduler.Scheduler.run().
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue