Change the python ifabort snippet