Skip to content

Commit

Permalink
Update ck2yaml Cantera#1396
Browse files Browse the repository at this point in the history
Add missing check in ck2yaml for non-integer equivalent floats
  • Loading branch information
corykinney committed Oct 3, 2022
1 parent 4f99d88 commit 40582ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions interfaces/cython/cantera/ck2yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,10 @@ def __init__(self, parser, label, geometry, well_depth, collision_diameter,
parser.warn("Incorrect syntax for geometry flag for species {0}. "
"If --permissive was given, the flag was automatically "
"converted to an integer.".format(label))
else:
raise InputError(
"Bad geometry flag '{}' for species '{}'. "
"Flag should be an integer.", geometry, label) from None
if geometry not in (0, 1, 2):
raise InputError("Bad geometry flag '{}' for species '{}'. "
"Flag value should 0, 1, or 2.", geometry, label)
Expand Down

0 comments on commit 40582ec

Please sign in to comment.