137a138,144
> #if PY_MAJOR_VERSION >= 3
> .def("getCode", &GlobalSimLoopExitEvent::getCode)
> #else
> // Workaround for an issue where PyBind11 converts the exit
> // code to a long. This is normally fine, but sys.exit treats
> // any non-int type as an error and exits with status 1 if it
> // is passed a long.
141a149
> #endif