fix pep8 warnings

This commit is contained in:
benoitc 2016-05-31 15:48:39 +02:00
parent 0d00a280bd
commit 4d845f2ae4

View File

@ -253,6 +253,7 @@ def parse_address(netloc, default_port=8000):
port = default_port
return (host, port)
def get_maxfd():
maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
if (maxfd == resource.RLIM_INFINITY):
@ -270,6 +271,7 @@ def set_non_blocking(fd):
flags = fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK
fcntl.fcntl(fd, fcntl.F_SETFL, flags)
def close(sock):
try:
sock.close()