empty kata analysis/other prob handling
This commit is contained in:
1 parent
da4262de7c
commit
4a6d1828d3
1 file changed
+2
-2
+2
-2
@@ -179,13 +179,13 @@ class EngineControls(GridLayout):
|
||||
self._send_analysis_query(self.outstanding_analysis_queries.pop(0))
|
||||
line = self.kata.stdout.readline()
|
||||
if self.debug:
|
||||
print("KATA ANALYSIS RECEIVED:", line[:50])
|
||||
print("KATA ANALYSIS RECEIVED:", line[:50], "...")
|
||||
if not line: # occasionally happens?
|
||||
return
|
||||
try:
|
||||
analysis = json.loads(line)
|
||||
except json.JSONDecodeError as e:
|
||||
print("JSON decode error", e, "on input", line)
|
||||
print(f"JSON decode error: '{e}' encountered after receiving input '{line}'")
|
||||
return
|
||||
self.board.store_analysis(analysis)
|
||||
self.update_evaluation()
|
||||
|
||||
Reference in new issue
Block a user