8000 Use more Pythonic style in gunicorn/. · alex-python/gunicorn@56e7d15 · GitHub
[go: up one dir, main page]

Skip to content

Commit 56e7d15

Browse files
committed
Use more Pythonic style in gunicorn/.
1 parent 783984c commit 56e7d15

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

gunicorn/glogging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def close_on_exec(self):
314314

315315
def _get_gunicorn_handler(self, log):
316316
for h in log.handlers:
317-
if getattr(h, "_gunicorn", False) == True:
317+
if getattr(h, "_gunicorn", False):
318318
return h
319319

320320
def _set_handler(self, log, output, fmt):

gunicorn/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def daemonize(enable_stdio_inheritance=False):
406406
Standard daemonization of a process.
407407
http://www.svbug.com/documentation/comp.unix.programmer-FAQ/faq_2.html#SEC16
408408
"""
409-
if not 'GUNICORN_FD' in os.environ:
409+
if 'GUNICORN_FD' not in os.environ:
410410
if os.fork():
411411
os._exit(0)
412412
os.setsid()

gunicorn/workers/gaiohttp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
if sys.version_info >= (3, 3):
99
try:
10-
import aiohttp
10+
import aiohttp # NOQA
1111
except ImportError:
1212
raise RuntimeError("You need aiohttp installed to use this worker.")
1313
else:

gunicorn/workers/gthread.py

Lines changed: 0 additions & 1 deletion
Original file line num 621D berDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import errno
1616
from functools import partial
1717
import os
18-
import operator
1918
import socket
2019
import ssl
2120
import sys

0 commit comments

Comments
 (0)
0