Skip to content

Commit

Permalink
Merge pull request numpy#21959 from michaelosthege/issue-21942
Browse files Browse the repository at this point in the history
BUG: Use `Popen` to silently invoke f77 -v
  • Loading branch information
rgommers authored Jul 12, 2022
2 parents 3da5da9 + 05927a6 commit 0d0e255
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion numpy/distutils/fcompiler/gnu.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,13 @@ def get_libraries(self):

def get_target(self):
try:
output = subprocess.check_output(self.compiler_f77 + ['-v'])
p = subprocess.Popen(
self.compiler_f77 + ['-v'],
stdin=subprocess.PIPE,
stderr=subprocess.PIPE,
)
stdout, stderr = p.communicate()
output = (stdout or b"") + (stderr or b"")
except (OSError, subprocess.CalledProcessError):
pass
else:
Expand Down

0 comments on commit 0d0e255

Please sign in to comment.