summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/distutils/mingw32ccompiler.py7
-rwxr-xr-xnumpy/f2py/rules.py2
2 files changed, 4 insertions, 5 deletions
diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py
index 4681d403b..541055899 100644
--- a/numpy/distutils/mingw32ccompiler.py
+++ b/numpy/distutils/mingw32ccompiler.py
@@ -651,7 +651,6 @@ def generate_manifest(config):
mi = int((msver - ma) * 10)
# Write the manifest file
manxml = msvc_manifest_xml(ma, mi)
- man = open(manifest_name(config), "w")
- config.temp_files.append(manifest_name(config))
- man.write(manxml)
- man.close()
+ with open(manifest_name(config), "w") as man:
+ config.temp_files.append(manifest_name(config))
+ man.write(manxml)
diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py
index 24777df5b..78810a0a7 100755
--- a/numpy/f2py/rules.py
+++ b/numpy/f2py/rules.py
@@ -566,7 +566,7 @@ rout_rules = [
'callfortran':'#name#_return_value,#name#_return_value_len,',
'callfortranroutine':[' #name#_return_value_len = #rlength#;',
' if ((#name#_return_value = (string)malloc('
- '#name#_return_value_len+1) == NULL) {',
+ + '#name#_return_value_len+1) == NULL) {',
' PyErr_SetString(PyExc_MemoryError, \"out of memory\");',
' f2py_success = 0;',
' } else {',