Pārlūkot izejas kodu

More accurate check of file descriptors

Alexander Smirnov 11 gadi atpakaļ
vecāks
revīzija
fbe90ac07b
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      celery/platforms.py

+ 1 - 1
celery/platforms.py

@@ -292,7 +292,7 @@ class DaemonContext(object):
         self.stdfds = (sys.stdin, sys.stdout, sys.stderr)
 
     def redirect_to_null(self, fd):
-        if fd:
+        if fd is not None:
             dest = os.open(os.devnull, os.O_RDWR)
             os.dup2(dest, fd)