I would use `if result.return_code == 0:` here because `is` is used to compare the same instance object and `==` is used to compare values. I know that Python have a little integer cache and 0 is there, but I would no be confident using the `is`.