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)
|
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
try:
|
try:
|
||||||
self.sock.bind(host_port_pair)
|
self.sock.bind(host_port_pair)
|
||||||
except OSError:
|
except OSError as e:
|
||||||
Logging.error("Port currently in use. Exiting...")
|
Logging.error(str(e))
|
||||||
exit(1)
|
exit(1)
|
||||||
self.sock.listen(2)
|
self.sock.listen(2)
|
||||||
self.handlers = []
|
self.handlers = []
|
||||||
|
|
Reference in a new issue