def _execute(self, command, params=None): try: return RemoteWebDriver.execute(self, command, params) except ErrorInResponseException, e: # Legacy behavior: calling close() multiple times should not raise # an error if command != Command.CLOSE and command != Command.QUIT: raise e