I think removing that block of code makes sense.
However, a few lines below, I would add a try/except around the call to self.driver.destroy(). It looks like it could raise if the instance is not created at the driver level, which could be the case for an instance that's in ERROR state.
I think removing that block of code makes sense.
However, a few lines below, I would add a try/except around the call to self.driver. destroy( ). It looks like it could raise if the instance is not created at the driver level, which could be the case for an instance that's in ERROR state.