Error passing

I'm trying to pass an error variable between python and fortran, so fortran can exit in case of python errors