Skip to content

Commit a7ab913

Browse files
committed
bug fix where temp file was not being properly closed.
1 parent 1c35763 commit a7ab913

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pyplot_module.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ subroutine execute(me, pyfile, istat)
907907
!delete the file (have to reopen it because
908908
!Fortran has no file delete function)
909909
open(newunit=iunit, file=file, status='OLD', iostat=istat)
910-
if (istat/=0) close(iunit, status='DELETE', iostat=istat)
910+
if (istat==0) close(iunit, status='DELETE', iostat=istat)
911911
end if
912912
if (istat/=0) then
913913
write(error_unit,'(A)') 'Error closing file.'

0 commit comments

Comments
 (0)