[#2819] [WebUI] Handle CannotListenError for second instance

This commit is contained in:
Calum Lind 2016-04-28 10:39:07 +01:00
parent bd65abd3b4
commit 7b523af05b
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,8 @@ from __future__ import print_function
import logging
from twisted.internet.error import CannotListenError
from deluge.common import run_profiled
from deluge.ui.ui import UI
@ -64,6 +66,8 @@ class Web(UI):
try:
self.server.install_signal_handlers()
self.server.start()
except CannotListenError as ex:
log.error("%s \nCheck that deluge-web or webui plugin are not already running.", ex)
except Exception as ex:
log.exception(ex)
raise