mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
select.error is a subclass of OSError since Python 3.3
This commit is contained in:
parent
610596c9d9
commit
2407dd29a6
@ -362,11 +362,10 @@ class Arbiter(object):
|
|||||||
return
|
return
|
||||||
while os.read(self.PIPE[0], 1):
|
while os.read(self.PIPE[0], 1):
|
||||||
pass
|
pass
|
||||||
except select.error as e:
|
except (select.error, OSError) as e:
|
||||||
if e.args[0] not in [errno.EAGAIN, errno.EINTR]:
|
# TODO: select.error is a subclass of OSError since Python 3.3.
|
||||||
raise
|
errno = getattr(e, 'errno', e.args[0])
|
||||||
except OSError as e:
|
if errno not in [errno.EAGAIN, errno.EINTR]:
|
||||||
if e.errno not in [errno.EAGAIN, errno.EINTR]:
|
|
||||||
raise
|
raise
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user