Skip to content

Commit

Permalink
Update sock.py by making bind list creation more readable
Browse files Browse the repository at this point in the history
Implementing suggestion by reviewer #3127 (comment) to make code more readable.
  • Loading branch information
tnusser authored Apr 17, 2024
1 parent a24ff07 commit ec52843
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gunicorn/sock.py
Original file line number Diff line number Diff line change
@@ -87,7 +87,8 @@ def create_sockets(conf, log, fds=None):
# first initialization of gunicorn
old_umask = os.umask(conf.umask)
try:
for addr in [bind for bind in conf.address if not isinstance(bind, int)]:
bind_list = [bind for bind in conf.address if not isinstance(bind, int)]
for addr in bind_list:
sock = create_socket(conf, log, addr)
set_socket_options(conf, sock)
listeners.append(sock)

0 comments on commit ec52843

Please sign in to comment.