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