From 3ea0f691fabb31bc0d49448ab96faab5e0b94439 Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 22 Apr 2019 14:06:06 +0300 Subject: [PATCH] Correct processing of errors while HDF reading --- test.hdfs/test_hdf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test.hdfs/test_hdf.py b/test.hdfs/test_hdf.py index 0294d1b65..5aafa9a41 100644 --- a/test.hdfs/test_hdf.py +++ b/test.hdfs/test_hdf.py @@ -128,7 +128,7 @@ if __name__ == "__main__": if len(sys.argv) > 2: salomePortFile = sys.argv[2] if len(sys.argv) > 3: - sys.stderr = open(sys.argv[3], 'w') + errFile = open(sys.argv[3], 'w') if len(sys.argv) > 4: salomeKernelDir = sys.argv[4] if len(sys.argv) > 5: @@ -144,7 +144,8 @@ if __name__ == "__main__": dbgFile.close() # =========================================== aTest = unittest.TestLoader().loadTestsFromTestCase(TestHDF) - unittest.TextTestRunner(stream=sys.stderr).run(aTest) + unittest.TextTestRunner(stream=errFile).run(aTest) + errFile.close() # test_program = unittest.main(argv=[sys.argv[0]], exit=False) proc = subprocess.Popen(salomeKernelDir + "/bin/salome/killSalome.py") -- 2.39.2