do not call into python api if an exception is set (#24022)
3 files changed