Rename socket.error to OSError.

Server shutdown management.
This commit is contained in:
grossmj committed 2014-04-06 11:37:34 -06:00
1 parent f4dd096a8b
commit 27379682df
5 files changed
+13 -17

No files matched your search

+1 -1
View File
@@ -798,7 +798,7 @@ class IOUDevice(object):
with socket.socket(socket.AF_INET, socket_type) as s:
s.bind((host, port)) # the port is available if bind is a success
return port
except socket.error as e:
except OSError as e:
if e.errno == errno.EADDRINUSE: # socket already in use
continue
else: