Log error instead of passing it to sys.exit()

This commit is contained in:
Stein Magnus Jodal 2010-08-24 20:22:45 +02:00
parent facf56ea54
commit 05d44d2915

View File

@ -36,7 +36,8 @@ class MpdServer(asyncore.dispatcher):
self._format_hostname(settings.MPD_SERVER_HOSTNAME),
settings.MPD_SERVER_PORT)
except IOError, e:
sys.exit('MPD server startup failed: %s' % e)
logger.error('MPD server startup failed: %s' % e)
sys.exit(1)
def handle_accept(self):
"""Handle new client connection."""