diff --git a/openmc/data/ace.py b/openmc/data/ace.py index 97be6f6275..06c581b426 100644 --- a/openmc/data/ace.py +++ b/openmc/data/ace.py @@ -573,11 +573,11 @@ def get_libraries_from_xsdata(path): List of paths to ACE libraries """ xsdata = Path(path) - with open(xsdata, 'r') as xsdata: + with open(xsdata, 'r') as xsdata_file: # As in get_libraries_from_xsdir, we use a dict for O(1) membership # check while retaining insertion order libraries = OrderedDict() - for line in xsdata: + for line in xsdata_file: words = line.split() if len(words) >= 9: lib = (xsdata.parent / words[8]).resolve()