We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b2f149 commit dbd5c76Copy full SHA for dbd5c76
1 file changed
chess/engine.py
@@ -1245,7 +1245,10 @@ def _start(self) -> None:
1245
self._handle_exception(err)
1246
1247
def _line_received(self, line: str) -> None:
1248
- assert self.state in [CommandState.ACTIVE, CommandState.CANCELLING], self.state
+ if self.state not in [CommandState.ACTIVE, CommandState.CANCELLING]:
1249
+ LOGGER.warning(f"engine sent unexpected line \"{line}\" in state {self.state}, ignoring")
1250
+ return
1251
+
1252
try:
1253
self.line_received(line)
1254
except EngineError as err:
0 commit comments