summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler/gnu.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2016-09-04 11:51:22 +0200
committerSebastian Berg <sebastian@sipsolutions.net>2016-09-04 11:51:22 +0200
commitf46278b11d5e1a62e52c30002d25bb2f3766f592 (patch)
treeffea7974efdc5ec69be5c535dff6847e5509a91a /numpy/distutils/fcompiler/gnu.py
parent6c624c5d8d911cd4b0abf587df1a123e0178a32d (diff)
downloadnumpy-f46278b11d5e1a62e52c30002d25bb2f3766f592.tar.gz
BUG: Fix fid.close() to use os.close(fid)
The error snuk in with some other file closing fixes and found by Warren Weckesser. Closes gh-8013
Diffstat (limited to 'numpy/distutils/fcompiler/gnu.py')
-rw-r--r--numpy/distutils/fcompiler/gnu.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py
index fd49db492..1de658afb 100644
--- a/numpy/distutils/fcompiler/gnu.py
+++ b/numpy/distutils/fcompiler/gnu.py
@@ -364,7 +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()
+ os.close(fid)
try:
d = os.path.dirname(filename)
output = os.path.splitext(filename)[0] + ".o"