mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Use getattr with default instead of if hasattr/else
This commit is contained in:
parent
5369c6c291
commit
25e22e31df
@ -31,10 +31,7 @@ import warnings
|
||||
from gunicorn.six import text_type, string_types
|
||||
|
||||
MAXFD = 1024
|
||||
if (hasattr(os, "devnull")):
|
||||
REDIRECT_TO = os.devnull
|
||||
else:
|
||||
REDIRECT_TO = "/dev/null"
|
||||
REDIRECT_TO = getattr(os, 'devnull', '/dev/null')
|
||||
|
||||
timeout_default = object()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user