I'm having a curious problem. I have a bash script that is calling a python script within it. The python script executes successfully, but never fully terminates
Content of Bash script:
#! /usr/bin/env bash
python python_script.py
echo "bar"
content of Python script:
#Much stuff
sys.exit("The python script just ended")
What I expect to see on termination would be:
>The python script just ended
>bar
What I instead get is:
>The python script just ended
If I keyboard interrupt, the bash continues as:
^C>bar
What gives? Clearly the exit is calling properly, and there is nothing between that and the output statement in the bash script that called the python script.
(I can't necessarily give specifics on the workings of the "Much stuff" in the python script, as I'm modifying existing code that I don't fully understand. I've mostly left the workings of the script alone, and modified output more than anything for formatting, but I'm happy to try and provide you with any additional information requested)