Exemplo n.º 1
0
 def quit(self):
     """Shut down the SC2 process."""
     try:
         # Don't expect a response.
         self._client.write(sc_pb.Request(quit=sc_pb.RequestQuit()))
     except protocol.ConnectionError:
         pass  # It's likely already (shutting) down, so continue as if it worked.
     finally:
         self.close()
Exemplo n.º 2
0
 async def quit(self):
     try:
         await self._execute(quit=sc_pb.RequestQuit())
     except ConnectionAlreadyClosed:
         pass
Exemplo n.º 3
0
 def quit(self):
     """Shut down the SC2 process."""
     try:
         return self._client.send(quit=sc_pb.RequestQuit())
     except protocol.ConnectionError:
         pass  # It's likely already (shutting) down, so continue as if it worked.
Exemplo n.º 4
0
 async def quit(self):
     await self._execute(quit=sc_pb.RequestQuit())
Exemplo n.º 5
0
 async def quit(self):
     try:
         await self._execute(quit=sc_pb.RequestQuit())
     except websockets.exceptions.ConnectionClosed:
         pass
Exemplo n.º 6
0
 async def quit(self):
     with suppress(ConnectionAlreadyClosed, ConnectionResetError):
         await self._execute(quit=sc_pb.RequestQuit())