Commit beadce17c4a3051614622c95f89ce637430609f3
1 parent
6f1583ea
Use ">/dev/null 2>&1" for redirection of file descriptor 2 (STDERR) and descript…
…or 1 (STDOUT) to /dev/null.
Showing
3 changed files
with
6 additions
and
6 deletions
test/test_cslightcrv.py
| @@ -85,7 +85,7 @@ class Test(gammalib.GPythonTestSuite): | @@ -85,7 +85,7 @@ class Test(gammalib.GPythonTestSuite): | ||
| 85 | 85 | ||
| 86 | # Execute cslightcrv, make sure we catch any exception | 86 | # Execute cslightcrv, make sure we catch any exception |
| 87 | try: | 87 | try: |
| 88 | - rc = os.system(cmd+" &>/dev/null") | 88 | + rc = os.system(cmd+" >/dev/null 2>&1") |
| 89 | except: | 89 | except: |
| 90 | pass | 90 | pass |
| 91 | 91 | ||
| @@ -106,7 +106,7 @@ class Test(gammalib.GPythonTestSuite): | @@ -106,7 +106,7 @@ class Test(gammalib.GPythonTestSuite): | ||
| 106 | 106 | ||
| 107 | # Execute cslightcrv, make sure we catch any exception | 107 | # Execute cslightcrv, make sure we catch any exception |
| 108 | try: | 108 | try: |
| 109 | - rc = os.system(cmd+" &>/dev/null") | 109 | + rc = os.system(cmd+" >/dev/null 2>&1") |
| 110 | except: | 110 | except: |
| 111 | pass | 111 | pass |
| 112 | 112 |
test/test_ctbin.py
| @@ -83,7 +83,7 @@ class Test(gammalib.GPythonTestSuite): | @@ -83,7 +83,7 @@ class Test(gammalib.GPythonTestSuite): | ||
| 83 | 83 | ||
| 84 | # Execute ctbin, make sure we catch any exception | 84 | # Execute ctbin, make sure we catch any exception |
| 85 | try: | 85 | try: |
| 86 | - rc = os.system(cmd+" >/dev/null") | 86 | + rc = os.system(cmd+" >/dev/null 2>&1") |
| 87 | except: | 87 | except: |
| 88 | pass | 88 | pass |
| 89 | 89 | ||
| @@ -104,7 +104,7 @@ class Test(gammalib.GPythonTestSuite): | @@ -104,7 +104,7 @@ class Test(gammalib.GPythonTestSuite): | ||
| 104 | 104 | ||
| 105 | # Execute ctbin, make sure we catch any exception | 105 | # Execute ctbin, make sure we catch any exception |
| 106 | try: | 106 | try: |
| 107 | - rc = os.system(cmd+" >/dev/null") | 107 | + rc = os.system(cmd+" >/dev/null 2>&1") |
| 108 | except: | 108 | except: |
| 109 | pass | 109 | pass |
| 110 | 110 |
test/test_ctobssim.py
| @@ -85,7 +85,7 @@ class Test(gammalib.GPythonTestSuite): | @@ -85,7 +85,7 @@ class Test(gammalib.GPythonTestSuite): | ||
| 85 | 85 | ||
| 86 | # Execute ctobssim, make sure we catch any exception | 86 | # Execute ctobssim, make sure we catch any exception |
| 87 | try: | 87 | try: |
| 88 | - rc = os.system(cmd+" >/dev/null") | 88 | + rc = os.system(cmd+" >/dev/null 2>&1") |
| 89 | except: | 89 | except: |
| 90 | pass | 90 | pass |
| 91 | 91 | ||
| @@ -106,7 +106,7 @@ class Test(gammalib.GPythonTestSuite): | @@ -106,7 +106,7 @@ class Test(gammalib.GPythonTestSuite): | ||
| 106 | 106 | ||
| 107 | # Execute ctobssim, make sure we catch any exception | 107 | # Execute ctobssim, make sure we catch any exception |
| 108 | try: | 108 | try: |
| 109 | - rc = os.system(cmd+" >/dev/null") | 109 | + rc = os.system(cmd+" >/dev/null 2>&1") |
| 110 | except: | 110 | except: |
| 111 | pass | 111 | pass |
| 112 | 112 |