Skip to content

Commit

Permalink
Specify type of exception in try expect block
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilZaim committed Nov 10, 2021
1 parent acc02bb commit a9d98bc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def add_species_to_dict(yt_ad, data_dict, species_name, prefix, suffix):
try:
## If species exist, we add its data to the dictionary
add_existing_species_to_dict(yt_ad, data_dict, species_name, prefix, suffix)
except:
except yt.utilities.exceptions.YTFieldNotFound:
## If species does not exist, we avoid python crash and add empty arrays to the
## dictionnary. Currently, this happens for the boron species in test number 4, which
## entirely fuses into alphas.
Expand Down

0 comments on commit a9d98bc

Please sign in to comment.