@@ -10,7 +10,7 @@ cimport cython
1010from cpython cimport Py_INCREF, Py_DECREF
1111from cpython.pycapsule cimport PyCapsule_New, PyCapsule_IsValid, PyCapsule_GetPointer
1212from libc.stdlib cimport malloc, free
13- from libc.stdio cimport fdopen, fclose
13+ from libc.stdio cimport fdopen
1414
1515from collections.abc import Iterable
1616from itertools import repeat
@@ -4240,7 +4240,6 @@ cdef class Model:
42404240 with open (filename, " w" ) as f:
42414241 cfile = fdopen(f.fileno(), " w" )
42424242 PY_SCIP_CALL(SCIPprintBestSol(self ._scip, cfile, write_zeros))
4243- fclose(cfile)
42444243
42454244 def writeBestTransSol (self , filename = " transprob.sol" , write_zeros = False ):
42464245 """ Write the best feasible primal solution for the transformed problem to a file.
@@ -4268,7 +4267,6 @@ cdef class Model:
42684267 with open (filename, " w" ) as f:
42694268 cfile = fdopen(f.fileno(), " w" )
42704269 PY_SCIP_CALL(SCIPprintSol(self ._scip, solution.sol, cfile, write_zeros))
4271- fclose(cfile)
42724270
42734271 def writeTransSol (self , Solution solution , filename = " transprob.sol" , write_zeros = False ):
42744272 """ Write the given transformed primal solution to a file.
@@ -4628,7 +4626,6 @@ cdef class Model:
46284626 with open (filename, " w" ) as f:
46294627 cfile = fdopen(f.fileno(), " w" )
46304628 PY_SCIP_CALL(SCIPprintStatistics(self ._scip, cfile))
4631- fclose(cfile)
46324629
46334630 def getNLPs (self ):
46344631 """ gets total number of LPs solved so far"""
0 commit comments