ko translation fixes, stderr fixes

This commit is contained in:
Sander Land committed 2020-05-31 01:55:55 +02:00
1 parent b69305dfdb
commit 325ab4a37f
6 files changed
+15 -8

No files matched your search

+5 -2
View File
@@ -64,7 +64,7 @@ class KataGoEngine:
self.katrain.log(f"Starting KataGo with {self.command}", OUTPUT_DEBUG)
self.katago_process = subprocess.Popen(
self.command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True
self.command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
except (FileNotFoundError, PermissionError, OSError) as e:
if not self.config["katago"].strip():
@@ -108,7 +108,10 @@ class KataGoEngine:
try:
line = self.katago_process.stderr.readline()
if line:
self.katrain.log(line.decode().strip(), OUTPUT_KATAGO_STDERR)
try:
self.katrain.log(line.decode().strip(), OUTPUT_KATAGO_STDERR)
except Exception as e:
print("ERROR IN PROCESSING STDERR", e)
except:
return