Hi Friend,
I write a linux shell script to call a python script inside. But I got a wrong exit code from Python exit code. The linux shell script as follows;
#!/bin/bash
MyPython.py
exit $?
After run the above linux script, I always got exit code 0. But autually the Python log file shows that its exit code is 256. In python script, use sys.exit(256).
My question is how linux script can get the correct Python exit code?
Thanks for your help.
Sunny
I write a linux shell script to call a python script inside. But I got a wrong exit code from Python exit code. The linux shell script as follows;
#!/bin/bash
MyPython.py
exit $?
After run the above linux script, I always got exit code 0. But autually the Python log file shows that its exit code is 256. In python script, use sys.exit(256).
My question is how linux script can get the correct Python exit code?
Thanks for your help.
Sunny
Comment