Skip to content

Commit 7d38655

Browse files
authored
fix: actually check wineserver (#397)
function failed to return anything, causing it to return None which is falsy. Regressed since 7b8b1cb causing #396 Fixes: #396
1 parent db5e386 commit 7d38655

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ou_dedetai/wine.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from . import system
1616
from . import utils
1717

18-
def check_wineserver(app: App):
18+
def check_wineserver(app: App) -> bool:
1919
# FIXME: if the wine version changes, we may need to restart the wineserver
2020
# (or at least kill it). Gotten into several states in dev where this happend
2121
# Normally when an msi install failed
@@ -24,6 +24,9 @@ def check_wineserver(app: App):
2424
if not process:
2525
logging.debug("Failed to spawn wineserver to check it")
2626
return False
27+
# We already check the return code in run_wine_during_install.
28+
# If there is a non-zero exit code subprocess.CalledProcessError will be raised
29+
return True
2730
except subprocess.CalledProcessError:
2831
return False
2932

@@ -631,7 +634,10 @@ def run_wine_during_install(
631634
additional_wine_dll_overrides=additional_wine_dll_overrides
632635
)
633636
if process:
634-
full_command_string = f"{wine_binary} {exe} {" ".join(exe_args)}"
637+
if exe:
638+
full_command_string = f"{wine_binary} {exe} {" ".join(exe_args)}"
639+
else:
640+
full_command_string = f"{wine_binary} {" ".join(exe_args)}"
635641
logging.debug(f"Waiting on: {full_command_string}")
636642
process.wait()
637643
logging.debug(f"Wine process {full_command_string} "

0 commit comments

Comments
 (0)