Commit beadce17c4a3051614622c95f89ce637430609f3

Authored by Jürgen Knödlseder
1 parent 6f1583ea

Use ">/dev/null 2>&1" for redirection of file descriptor 2 (STDERR) and descript…

…or 1 (STDOUT) to /dev/null.
test/test_cslightcrv.py
... ... @@ -85,7 +85,7 @@ class Test(gammalib.GPythonTestSuite):
85 85  
86 86 # Execute cslightcrv, make sure we catch any exception
87 87 try:
88   - rc = os.system(cmd+" &>/dev/null")
  88 + rc = os.system(cmd+" >/dev/null 2>&1")
89 89 except:
90 90 pass
91 91  
... ... @@ -106,7 +106,7 @@ class Test(gammalib.GPythonTestSuite):
106 106  
107 107 # Execute cslightcrv, make sure we catch any exception
108 108 try:
109   - rc = os.system(cmd+" &>/dev/null")
  109 + rc = os.system(cmd+" >/dev/null 2>&1")
110 110 except:
111 111 pass
112 112  
... ...
test/test_ctbin.py
... ... @@ -83,7 +83,7 @@ class Test(gammalib.GPythonTestSuite):
83 83  
84 84 # Execute ctbin, make sure we catch any exception
85 85 try:
86   - rc = os.system(cmd+" >/dev/null")
  86 + rc = os.system(cmd+" >/dev/null 2>&1")
87 87 except:
88 88 pass
89 89  
... ... @@ -104,7 +104,7 @@ class Test(gammalib.GPythonTestSuite):
104 104  
105 105 # Execute ctbin, make sure we catch any exception
106 106 try:
107   - rc = os.system(cmd+" >/dev/null")
  107 + rc = os.system(cmd+" >/dev/null 2>&1")
108 108 except:
109 109 pass
110 110  
... ...
test/test_ctobssim.py
... ... @@ -85,7 +85,7 @@ class Test(gammalib.GPythonTestSuite):
85 85  
86 86 # Execute ctobssim, make sure we catch any exception
87 87 try:
88   - rc = os.system(cmd+" >/dev/null")
  88 + rc = os.system(cmd+" >/dev/null 2>&1")
89 89 except:
90 90 pass
91 91  
... ... @@ -106,7 +106,7 @@ class Test(gammalib.GPythonTestSuite):
106 106  
107 107 # Execute ctobssim, make sure we catch any exception
108 108 try:
109   - rc = os.system(cmd+" >/dev/null")
  109 + rc = os.system(cmd+" >/dev/null 2>&1")
110 110 except:
111 111 pass
112 112  
... ...