mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix pep8 warnings
This commit is contained in:
parent
0d00a280bd
commit
4d845f2ae4
@ -253,6 +253,7 @@ def parse_address(netloc, default_port=8000):
|
|||||||
port = default_port
|
port = default_port
|
||||||
return (host, port)
|
return (host, port)
|
||||||
|
|
||||||
|
|
||||||
def get_maxfd():
|
def get_maxfd():
|
||||||
maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
|
maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
|
||||||
if (maxfd == resource.RLIM_INFINITY):
|
if (maxfd == resource.RLIM_INFINITY):
|
||||||
@ -270,6 +271,7 @@ def set_non_blocking(fd):
|
|||||||
flags = fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK
|
flags = fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK
|
||||||
fcntl.fcntl(fd, fcntl.F_SETFL, flags)
|
fcntl.fcntl(fd, fcntl.F_SETFL, flags)
|
||||||
|
|
||||||
|
|
||||||
def close(sock):
|
def close(sock):
|
||||||
try:
|
try:
|
||||||
sock.close()
|
sock.close()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user