commit fdaf4e42a9c1ed1c3d27eea49b5f2be59361c902
parent a90f3e00276b67f5a5853dbedd8f91c763dc83cf
Author: ThomasV <thomasv@gitorious>
Date: Sat, 28 Feb 2015 19:45:10 +0100
print reason if connection fails
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/interface.py b/lib/interface.py
@@ -181,10 +181,10 @@ class TcpInterface(threading.Thread):
s = socket.socket(res[0], socket.SOCK_STREAM)
s.connect(res[4])
return s
- except:
+ except BaseException as e:
continue
else:
- print_error("failed to connect", self.host, self.port)
+ print_error("failed to connect", self.host, self.port, str(e))
def get_socket(self):