浏览代码

Fix 2 unclosed files in test_dispatchers.py

Fixes 2 of the `ResourceWarning` warnings in GH-391.
Marc Abramowitz 11 年之前
父节点
当前提交
6a87f5eeae
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      supervisor/tests/test_dispatchers.py

+ 4 - 0
supervisor/tests/test_dispatchers.py

@@ -289,6 +289,8 @@ class POutputDispatcherTests(unittest.TestCase):
 
         finally:
             try:
+                dispatcher.capturelog.close()
+                dispatcher.childlog.close()
                 os.remove(logfile)
             except (OSError, IOError):
                 pass
@@ -353,6 +355,8 @@ class POutputDispatcherTests(unittest.TestCase):
 
         finally:
             try:
+                dispatcher.capturelog.close()
+                dispatcher.childlog.close()
                 os.remove(logfile)
             except (OSError, IOError):
                 pass