[consider merging] Fixed Python Exit Exception - Python test fails were not recognized

This commit is contained in:
Matthias Koefferlein 2023-11-25 20:22:36 +01:00
parent b1ddb702b8
commit 38d7d34642
1 changed files with 3 additions and 2 deletions

View File

@ -117,8 +117,9 @@ void check_error ()
} else if (PyErr_GivenExceptionMatches (exc_type.get (), PyExc_SystemExit)) {
int status = 0;
if (exc_value && test_type<int> (exc_value.get (), true)) {
status = python2c<int> (exc_value.get ());
if (exc_value) {
tl::Variant st = python2c<tl::Variant> (exc_value.get ());
status = st.to_int ();
}
throw tl::ExitException (status);