mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Make sure /dev/null isn't open for the entire process
This commit is contained in:
parent
1c3ac71bab
commit
db61158325
1 changed files with 4 additions and 5 deletions
|
|
@ -3,9 +3,6 @@ import subprocess
|
|||
import os
|
||||
|
||||
|
||||
FNULL = open(os.devnull, 'w')
|
||||
|
||||
|
||||
class Executor(object):
|
||||
|
||||
|
||||
|
|
@ -34,7 +31,8 @@ class Executor(object):
|
|||
subprocess.check_call('openmc -p', shell=True,
|
||||
cwd=self._working_directory)
|
||||
else:
|
||||
subprocess.check_call('openmc -p', shell=True, stdout=FNULL,
|
||||
subprocess.check_call('openmc -p', shell=True,
|
||||
stdout=open(os.devnull, 'w'),
|
||||
cwd=self._working_directory)
|
||||
|
||||
|
||||
|
|
@ -69,5 +67,6 @@ class Executor(object):
|
|||
subprocess.check_call(command, shell=True,
|
||||
cwd=self._working_directory)
|
||||
else:
|
||||
subprocess.check_call(command, shell=True, stdout=FNULL,
|
||||
subprocess.check_call(command, shell=True,
|
||||
stdout=open(os.devnull, 'w'),
|
||||
cwd=self._working_directory)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue