fix startupinfo

This commit is contained in:
Sander Land committed 2020-09-19 14:30:08 +02:00
1 parent f815347fbf
commit 199ffe8d42
1 file changed
+4 -2
+4 -2
View File
@@ -85,8 +85,10 @@ class KataGoEngine:
def start(self):
try:
self.katrain.log(f"Starting KataGo with {self.command}", OUTPUT_DEBUG)
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo = None # stop command box popups on windows/pyinstaller
if hasattr(subprocess, "STARTUPINFO"):
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
self.katago_process = subprocess.Popen(
self.command,
startupinfo=startupinfo,