Using string repr of error when address is in use
This commit is contained in:
parent
7f881f3bf7
commit
8033e044fb
1 changed files with 2 additions and 2 deletions
|
@ -15,8 +15,8 @@ class Server:
|
|||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
try:
|
||||
self.sock.bind(host_port_pair)
|
||||
except OSError:
|
||||
Logging.error("Port currently in use. Exiting...")
|
||||
except OSError as e:
|
||||
Logging.error(str(e))
|
||||
exit(1)
|
||||
self.sock.listen(2)
|
||||
self.handlers = []
|
||||
|
|
Reference in a new issue