From 9808c90314ded2d8bdaab636eb5ea750b4fa6aa9 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 20 Sep 2010 17:27:26 +0200 Subject: little fixes --- module/plugins/hooks/ClickAndLoad.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'module/plugins/hooks/ClickAndLoad.py') diff --git a/module/plugins/hooks/ClickAndLoad.py b/module/plugins/hooks/ClickAndLoad.py index f0372dbf8..0ca492cb7 100644 --- a/module/plugins/hooks/ClickAndLoad.py +++ b/module/plugins/hooks/ClickAndLoad.py @@ -64,7 +64,12 @@ def server(self, *settings): thread.start_new_thread(forward, (client_socket, server_socket)) thread.start_new_thread(forward, (server_socket, client_socket)) except socket.error, e: - if e.errno == 98: + if hasattr(e, "errno"): + errno = e.errno + else: + errno = e.args[0] + + if errno == 98: self.core.log.warning(_("Click'N'Load: Port 9666 already in use")) return thread.start_new_thread(server, (self,)+settings) -- cgit v1.2.3