Merge pull request #1994 from yardasol/omc-ace-hdf5-bugfix

Fix overwritten variable in `ace.py::get_libraries_from_xsdata`
This commit is contained in:
Paul Romano 2022-03-09 15:27:57 -06:00 committed by GitHub
commit 4f7a31e48d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()