Skip to content

Commit

Permalink
Fix warning error if file is missing FLASH data in opac-convert
Browse files Browse the repository at this point in the history
  • Loading branch information
jtlaune committed Mar 1, 2018
1 parent df46863 commit d293fb4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opacplot2/scripts/opac_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ def eosDict_toIonmix(self):
imx_dict['ngroups'] = len(self.eos_dict['groups']) - 1

# Check if required FLASH EoS tables are present.
if not (imx_dict >= {'zbar', 'eion', 'eele', 'pion', 'pele'}):
imx_req_keys = ['zbar', 'eion', 'eele', 'pion', 'pele']
if not all(key in imx_dict for key in imx_req_keys):
print("The required EoS data for FLASH is not present...\n"
"Aborting the IONMIX file creation...")
raise Warning("Missing EoS data for IONMIX file to run in FLASH")
Expand Down

0 comments on commit d293fb4

Please sign in to comment.