[python] How to get exit code when using Python subprocess communicate method?