Skip to content

Commit

Permalink
Merge pull request #1752 from ReactionMechanismGenerator/message
Browse files Browse the repository at this point in the history
Fix two calls to Exception.message, which no longer exists
  • Loading branch information
ajocher authored Oct 7, 2019
2 parents fcc4614 + 5566497 commit 29e111d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rmgpy/chemkin.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ def read_reactions_block(f, species_dict, read_comments=True):
reaction = read_kinetics_entry(kinetics, species_dict, Aunits, Eunits)
reaction = read_reaction_comments(reaction, comments, read=read_comments)
except ChemkinError as e:
if e.message == "Skip reaction!":
if "Skip reaction!" in str(e):
logging.warning("Skipping the reaction {0!r}".format(kinetics))
continue
else:
Expand Down
4 changes: 2 additions & 2 deletions rmgpy/solver/base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,8 @@ cdef class ReactionSystem(DASx):
if np.isnan(self.y).any():
raise DASxError("nans in moles")
except DASxError as e:
logging.error("Trying to step from time {} to {} resulted in a solver (DASPK) error: "
"{}".format(prev_time, step_time, e.message))
logging.error("Trying to step from time {0} to {1} resulted in a solver (DASPK) error: "
"{2!s}".format(prev_time, step_time, e))

logging.info('Resurrecting Model...')

Expand Down

0 comments on commit 29e111d

Please sign in to comment.