From beadce17c4a3051614622c95f89ce637430609f3 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Wed, 16 Mar 2016 00:16:57 +0100 Subject: [PATCH] Use ">/dev/null 2>&1" for redirection of file descriptor 2 (STDERR) and descriptor 1 (STDOUT) to /dev/null. --- test/test_cslightcrv.py | 4 ++-- test/test_ctbin.py | 4 ++-- test/test_ctobssim.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test_cslightcrv.py b/test/test_cslightcrv.py index ae459e1..e66bd55 100755 --- a/test/test_cslightcrv.py +++ b/test/test_cslightcrv.py @@ -85,7 +85,7 @@ class Test(gammalib.GPythonTestSuite): # Execute cslightcrv, make sure we catch any exception try: - rc = os.system(cmd+" &>/dev/null") + rc = os.system(cmd+" >/dev/null 2>&1") except: pass @@ -106,7 +106,7 @@ class Test(gammalib.GPythonTestSuite): # Execute cslightcrv, make sure we catch any exception try: - rc = os.system(cmd+" &>/dev/null") + rc = os.system(cmd+" >/dev/null 2>&1") except: pass diff --git a/test/test_ctbin.py b/test/test_ctbin.py index c2ec34f..eab2c70 100755 --- a/test/test_ctbin.py +++ b/test/test_ctbin.py @@ -83,7 +83,7 @@ class Test(gammalib.GPythonTestSuite): # Execute ctbin, make sure we catch any exception try: - rc = os.system(cmd+" >/dev/null") + rc = os.system(cmd+" >/dev/null 2>&1") except: pass @@ -104,7 +104,7 @@ class Test(gammalib.GPythonTestSuite): # Execute ctbin, make sure we catch any exception try: - rc = os.system(cmd+" >/dev/null") + rc = os.system(cmd+" >/dev/null 2>&1") except: pass diff --git a/test/test_ctobssim.py b/test/test_ctobssim.py index fa235a9..4413eee 100755 --- a/test/test_ctobssim.py +++ b/test/test_ctobssim.py @@ -85,7 +85,7 @@ class Test(gammalib.GPythonTestSuite): # Execute ctobssim, make sure we catch any exception try: - rc = os.system(cmd+" >/dev/null") + rc = os.system(cmd+" >/dev/null 2>&1") except: pass @@ -106,7 +106,7 @@ class Test(gammalib.GPythonTestSuite): # Execute ctobssim, make sure we catch any exception try: - rc = os.system(cmd+" >/dev/null") + rc = os.system(cmd+" >/dev/null 2>&1") except: pass -- libgit2 0.21.4