os.WEXITSTATUS()

os.WEXITSTATUS(status) → integer

Return the process return code from ‘status’.