Skip to content

Commit

Permalink
Close file after reading in t2incon.read()
Browse files Browse the repository at this point in the history
  • Loading branch information
acroucher committed Feb 18, 2020
1 parent d3da684 commit fe70128
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions t2incons.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def read(self, filename, num_variables = None):
[kcyc, itr, nm, tstart, sumtim] = infile.parse_string(line, timing_fmt)
self.timing = {'kcyc': kcyc, 'iter': itr, 'nm': nm,
'tstart': tstart, 'sumtim': sumtim}
infile.close()

def write(self, filename, reset = True):
"""Writes initial conditions to file."""
Expand Down

0 comments on commit fe70128

Please sign in to comment.