summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2013-10-14 20:19:57 +0200
committerJoel Rosdahl <joel@rosdahl.net>2013-10-14 20:19:57 +0200
commit6e1fa78278eec6e5965756a24972ec72aceb9d02 (patch)
tree198af84fc447ca8eee99873e0ff6b06e6138ea4c
parent384fb8223b5dc7b58bae59aab1296b1acd80841f (diff)
downloadminiircd-6e1fa78278eec6e5965756a24972ec72aceb9d02.tar.gz
miniircd-6e1fa78278eec6e5965756a24972ec72aceb9d02.zip
Avoid crashing due to TypeError on SSL connection error
-rwxr-xr-xminiircd13
1 files changed, 8 insertions, 5 deletions
diff --git a/miniircd b/miniircd
index 1e48a2b..33f6867 100755
--- a/miniircd
+++ b/miniircd
@@ -759,12 +759,15 @@ class Server(object):
(conn, addr) = x.accept()
if self.ssl_pem_file:
try:
- conn = ssl.wrap_socket(conn,
- server_side=True,
- certfile=self.ssl_pem_file,
- keyfile=self.ssl_pem_file)
+ conn = ssl.wrap_socket(
+ conn,
+ server_side=True,
+ certfile=self.ssl_pem_file,
+ keyfile=self.ssl_pem_file)
except ssl.SSLError as e:
- self.print_error('SSL error: %s\n' % (addr, e))
+ self.print_error(
+ "SSL error for connection from %s:%s: %s" % (
+ addr[0], addr[1], e))
continue
self.clients[conn] = Client(self, conn)
self.print_info("Accepted connection from %s:%s." % (