summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r--module/plugins/hooks/ClickAndLoad.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/plugins/hooks/ClickAndLoad.py b/module/plugins/hooks/ClickAndLoad.py
index f7c12356b..ab29c8731 100644
--- a/module/plugins/hooks/ClickAndLoad.py
+++ b/module/plugins/hooks/ClickAndLoad.py
@@ -37,8 +37,12 @@ class ClickAndLoad(Hook):
self.port = int(self.core.config['webinterface']['port'])
if self.core.config['webinterface']['activated']:
- forwarder('127.0.0.1', 9666, '127.0.0.1', self.port)
- thread.start_new_thread(asyncore.loop, ())
+ try:
+ forwarder('127.0.0.1', 9666, '127.0.0.1', self.port)
+ thread.start_new_thread(asyncore.loop, ())
+ except:
+ self.core.logger.error("ClickAndLoad port already in use.")
+
class forwarder(asyncore.dispatcher):
def __init__(self, ip, port, remoteip, remoteport, backlog=5):