Skip to content

Commit fbe90ac

Browse files
Alexander Smirnovask
authored andcommitted
More accurate check of file descriptors
1 parent aad5e9b commit fbe90ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

celery/platforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def __init__(self, pidfile=None, workdir=None, umask=None,
292292
self.stdfds = (sys.stdin, sys.stdout, sys.stderr)
293293

294294
def redirect_to_null(self, fd):
295-
if fd:
295+
if fd is not None:
296296
dest = os.open(os.devnull, os.O_RDWR)
297297
os.dup2(dest, fd)
298298

0 commit comments

Comments
 (0)