mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[Input] Fix validation handling with minimal Python module
This commit is contained in:
parent
518b74d5fe
commit
781f7d74a2
@ -2238,7 +2238,7 @@ def main(argv):
|
||||
return
|
||||
|
||||
try:
|
||||
import cantera as ct
|
||||
from cantera import Solution, Interface
|
||||
except ImportError:
|
||||
logger.warning('WARNING: Unable to import Cantera Python module. '
|
||||
'Output mechanism has not been validated')
|
||||
@ -2246,9 +2246,9 @@ def main(argv):
|
||||
|
||||
try:
|
||||
logger.info('Validating mechanism...')
|
||||
gas = ct.Solution(out_name)
|
||||
gas = Solution(out_name)
|
||||
for surf_name in surfaces:
|
||||
phase = ct.Interface(out_name, surf_name, [gas])
|
||||
phase = Interface(out_name, surf_name, [gas])
|
||||
logger.info('PASSED')
|
||||
except RuntimeError as e:
|
||||
logger.info('FAILED')
|
||||
|
@ -1771,7 +1771,7 @@ def main():
|
||||
|
||||
# Do full validation by importing the resulting mechanism
|
||||
try:
|
||||
import cantera as ct
|
||||
from cantera import Solution, Interface
|
||||
except ImportError:
|
||||
print("WARNING: Unable to import Cantera Python module. "
|
||||
"Output mechanism has not been validated")
|
||||
@ -1779,9 +1779,9 @@ def main():
|
||||
|
||||
try:
|
||||
print("Validating mechanism...")
|
||||
gas = ct.Solution(output_name)
|
||||
gas = Solution(output_name)
|
||||
for surf_name in surfaces:
|
||||
phase = ct.Interface(output_name, surf_name)
|
||||
phase = Interface(output_name, surf_name)
|
||||
print("PASSED")
|
||||
except RuntimeError as e:
|
||||
print("FAILED")
|
||||
|
Loading…
Reference in New Issue
Block a user