Improve file checking and reporting in openmc-make-depletion-chain

This commit is contained in:
Andrew Johnson 2019-08-19 10:15:25 -05:00
parent 37c871cbad
commit 68b3fd6ec8
No known key found for this signature in database
GPG key ID: 253418E91B7F6FEB

View file

@ -33,9 +33,8 @@ def main():
nfy_files = tuple((endf_dir / "nfy").glob("*endf"))
# check files exist
for flist, ftype in zip(
(decay_files, neutron_files, nfy_files),
("decay", "neutron", "nfy")):
for flist, ftype in [(decay_files, "decay"), (neutron_files, "neutron"),
(nfy_files, "neutron fission product yield")]:
if not flist:
raise IOError("No {} endf files found in {}".format(ftype, endf_dir))