浏览代码

Close remaining pipes if some are missing

Mike Naberezny 10 年之前
父节点
当前提交
e870ed366d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      supervisor/options.py

+ 2 - 2
supervisor/options.py

@@ -1538,13 +1538,13 @@ class ServerOptions(Options):
 
     def close_parent_pipes(self, pipes):
         for fdname in ('stdin', 'stdout', 'stderr'):
-            fd = pipes[fdname]
+            fd = pipes.get(fdname)
             if fd is not None:
                 self.close_fd(fd)
 
     def close_child_pipes(self, pipes):
         for fdname in ('child_stdin', 'child_stdout', 'child_stderr'):
-            fd = pipes[fdname]
+            fd = pipes.get(fdname)
             if fd is not None:
                 self.close_fd(fd)