mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Changes in data/endf.py from PullRequest Inc. review
This commit is contained in:
parent
1b177634f4
commit
5f6bf21aba
1 changed files with 5 additions and 0 deletions
|
|
@ -397,8 +397,10 @@ class Evaluation:
|
|||
def __init__(self, filename_or_obj):
|
||||
if isinstance(filename_or_obj, (str, PurePath)):
|
||||
fh = open(str(filename_or_obj), 'r')
|
||||
need_to_close = True
|
||||
else:
|
||||
fh = filename_or_obj
|
||||
need_to_close = False
|
||||
self.section = {}
|
||||
self.info = {}
|
||||
self.target = {}
|
||||
|
|
@ -446,6 +448,9 @@ class Evaluation:
|
|||
section_data += line
|
||||
self.section[MF, MT] = section_data
|
||||
|
||||
if need_to_close:
|
||||
fh.close()
|
||||
|
||||
self._read_header()
|
||||
|
||||
def __repr__(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue