summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2016-08-29 23:20:16 +0200
committerSebastian Berg <sebastian@sipsolutions.net>2016-09-02 10:10:55 +0200
commitb831444bee734537daeaffd1455eb88663ee3763 (patch)
tree5dbcba710026edce886a62a722789391281393e4 /numpy/distutils/fcompiler
parent2e86117d7ba2b4b0308b05a67b922f6db19a7c02 (diff)
downloadnumpy-b831444bee734537daeaffd1455eb88663ee3763.tar.gz
MAINT: Close some filehandlers and PIPEs after being done
The PIPE in the tests caused a ResourceWarning during testing in python 3.
Diffstat (limited to 'numpy/distutils/fcompiler')
-rw-r--r--numpy/distutils/fcompiler/gnu.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py
index 7c3dc4162..9697aa8db 100644
--- a/numpy/distutils/fcompiler/gnu.py
+++ b/numpy/distutils/fcompiler/gnu.py
@@ -364,6 +364,7 @@ def _can_target(cmd, arch):
"""Return true if the architecture supports the -arch flag"""
newcmd = cmd[:]
fid, filename = tempfile.mkstemp(suffix=".f")
+ fid.close()
try:
d = os.path.dirname(filename)
output = os.path.splitext(filename)[0] + ".o"