mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Fix "TypeError: 'OSError' object is not subscriptable" in py3
This commit is contained in:
parent
328e509260
commit
68260c6883
@ -43,7 +43,7 @@ class BaseSocket(object):
|
||||
try:
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
|
||||
except socket.error as err:
|
||||
if err[0] not in (errno.ENOPROTOOPT, errno.EINVAL):
|
||||
if err.errno not in (errno.ENOPROTOOPT, errno.EINVAL):
|
||||
raise
|
||||
if not bound:
|
||||
self.bind(sock)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user